Roasted Chili paste (naam prik pao - น้ำพริกเผา) is a condiment which is used in a variety of dishes, ranging from soups, salads to stir fries. You can even spread it on toast like you would fruit jam. Many people buy this pre-made in jars, but fresh is better!
Peel and cut the garlic & shallots thinly and uniform. If they are different sizes they will cook at different speeds, resulting in burning. De-seed the chilies.
Fry the garlic in the oil on medium heat until lightly browned. Remove the garlic and set aside. Fry the shallots the same way, and set aside. Fry the chilies until fragrant, but be careful not to burn, then set aside. Fry the shrimp until light browned and fragrant, set aside and keep the oil in the pan. Both the garlic and shallots will continue to cook for a minute or two so don’t take them out too late.
Roast the shrimp paste in tin foil in a dry pan (or directly on the burner if you have an electric stove) for about 2-3 minutes on medium heat.
Powder each ingredient seperately, either in a stone mortar & pestle or in an electric spice mixer. Then mix together.
Return the mixture to the pan with the oil along with the shrimp paste. Cook over low heat until fragrant and browned. Be careful not to burn.
Add the tamarind, palm sugar and fish sauce. Continue to cook over low heat to reduce a bit to a jam consistency.
Store in the refridgerator. It’ll last for a really long time.
It's very important you are careful to slice the garlic & shallots the same size. Burned garlic or shallots will ruin the flavor.
It's also really important on the 2nd frying not to burn the mixture, or the naam prik pao will taste bitter.
Some people dry roast the chilies, feel free to try either way.
I'm not sure if roasting the shrimp paste prior to frying really does anything. If you're feeling lazy I think it wouldn't hurt to skip this step.