Add chili flakes, white sesame seeds, Chinese five spice powder, clove powder and salt in a big heat-resistant bowl and lay the ginger slices on the top.
Heat oil with shallot, scallion, cilantro and dried shrimp in a sauce pan over medium low heat and cook until the edge of the shallots turn golden brown, about 5-7 minutes.
Fish out the vegetables and dried shrimp and set it aside. You can use it for making braised meat or soup.
Add Sichuan peppercorn, fennel seed, bay leaf, star anise and cinnamon stick into the oil and continue to cook for another 5 minutes. Adjust the heat if as needed to maintain a gentle boil.
Remove the pot from the heat and wait for 10 seconds before pouring the hot oil through a strainer into the bowl with chili flakes and seasonings. Stir the chili oil right away so that everything heats up evenly.
Store the chili oil in a glass jar and let it sit for a few hours to overnight before using. This allows the flavors to develop.