This versatile condiment is a staple of Thai cuisine. It has the perfect balance of sweetness and a spicy kick. Plus, the tangy tamarind and umami-rich anchovies give it a depth of flavor that makes it absolutely irresistible.
In a large skillet, heat 1/4 cup of the oil over medium-high heat until shimmering hot. Add the garlic and shallots and fry, stirring occasionally, until lightly browned and crisp, about 2 minutes.2.
Add the dried shrimp and fry until the shrimp turn dark in color and become fragrant, about 2 minutes more. Remove the pan from the heat and let everything cool slightly, then scrape the mixture (along with the oil) into a blender or food processor.3.
Without wiping it out, return the pan to medium-low heat. Add the red chiles and toast until they darken in color and become brittle, 3-4 minutes, making sure they don't burn (when they start to smell roasty and fragrant, you're about there). Immediately transfer the chiles to the blender.4.
Add the brown sugar, tamarind paste, fish sauce, anchovy paste, and 1/2 cup warm water to the blender and blend until smooth.5.
Add the remaining 2 tablespoons oil to the same pan you used to toast the chiles and heat over medium heat. Once the oil is shimmering-hot, add the blended paste to the pan. Cook, stirring occasionally, until the paste has reduced to a thick jam-like consistency with a thin layer of oil on top (you should be able to make a hole in the center of the pan and not have the jam immediately fill it back in), 15-20 minutes.6.
Taste and adjust the seasoning with salt and add more brown sugar, if needed. Remove the pan from the heat and let the paste cool completely. Transfer to a clean glass jar and store in the refrigerator for up to 1 month.