Tear open the chilies and remove as many seeds as you can. A few left behind won't matter.
Discard the seeds and place the chili skins in a food processor and pulse until roughly chopped
Place the chilies, szechuan pepper, star anise, cardamom, salt, stock and sugar in a heat proof bowl
Place the oil and shallots in a saucepan
Bring to a simmer and fry the shallots until it starts to turn a light golden colour
Add the garlic and fry for another few minutes until the garlic turns a golden colour
Add the peanuts and sesame seeds and fry for another minute or two
Be careful that the shallots or garlic does not get too brown as the oil will end up tasting burnt
Place a sieve on top of the bowl with the chilies
Pour the oil through the sieve so the oil ends in the bowl and the shallots, garlic and peanuts remain in the sieve
Give the oil in the bowl a stir and let the shallots, garlic and peanuts cool down in the sieve
Once cool and crisp, add the shallots, garlic etc to oil
Spoon the chilli oil mixture into jars
The flavour and colour will develop the longer it stands
Keep in the fridge for up to 2 months