Using a mandolin or a sharp knife, thinly slice the shallots and garlic to ensure even cooking. Set aside the dried chillies in a bowl, and have your whole spices ready on a separate plate.
Heat your choice of cooking oil in a pot over medium heat. Add the sliced shallots and garlic, stirring occasionally. Fry until they turn golden brown. Once browned, use a slotted spoon to transfer the aromatics to kitchen towel.
Pour the reserved oil back into the pot, then add the whole spices. Let them sizzle for 3-4 minutes to release their fragrance.
In a separate bowl, combine the dried chillies, sugar, salt, MSG (optional), Chinese black vinegar (optional), and toasted peanuts and sesame seeds (if using). Mix everything well.
Turn off the heat under the infused oil and let it cool slightly. Carefully pour the hot oil over the chilli mixture and stir thoroughly to combine.
For the best flavour, let your chilli crisp rest for at least 24 hours before using. Store it in airtight jars.
