Halve 2 onions and place, cut-side down, in a frying pan with 2 teaspoons oil. Cook over high heat, without turning, for 3 minutes or until blackened. Remove from the pan and set aside. Repeat with the garlic using the same pan.
Peel the remaining onion and thinly slice. Heat 2 teaspoons oil in a large frying pan over high heat. Cook the sliced onion for 3 minutes, allowing it to scorch and ‘catch’ on the base of the pan. Add the burnt onion halves and garlic, herbs, stock and 350 ml (12 fl oz) water to the pan, reduce the heat to low and simmer for 3 hours.
Strain and return the liquid to a clean pan over medium heat. Simmer for 15 minutes or until reduced to 100 ml (3½ fl oz), skimming the scum from the surface regularly. Remove from the heat. Add the xanthan gum and the remaining oil and process using a stick blender until emulsified. Set aside and keep warm.