Clean the garlic and the shallots.
Add olive oil to the ThermoMix. Set ThermoMix to speed 7 for 5 seconds. Drop garlic and shallots onto spinning blades through hole in the lid. Process for 5 minutes at 100C at speed 2. (If you don't have a ThermoMix, mince shallots and garlic. Saute in olive oil till soft and fragrant.)
Add 1 can of drained whole tomatoes, the salt, sugar, and black pepper to taste (can add some pepper flakes if you want it spicier). Process at 90C for an hour at speed 2.
Add butter and process at speed 5 for 5 seconds. Add basil and process at speed 3 reverse for 5 seconds. Adjust seasonings and use.