A specialty of southern Thailand traditionally used in a curry made with beef and potatoes (see Beef Massaman Curry). To store and use excess paste, see About Pastes.
Combine in a large heavy skillet over medium heat and toast, stirring, until fragrant, about 3 minutes:
Add:
Toast until slightly darkened and fragrant, 2 to 3 minutes, shaking the pan to prevent scorching. Pour the chiles and spices into a bowl and let cool. Add to the dry skillet:
Cook, stirring, until everything is lightly charred and softened, 15 to 20 minutes. Transfer to a bowl and let cool. Meanwhile, crack the cardamom pods by pounding them under the side of a knife. Collect the seeds within and discard the pods. Grind the seeds with all the other spices in a mortar and pestle or spice grinder. If desired, transfer to a food processor. When the garlic is cool enough to handle, peel and add to the mortar or food processor. Peel the shallots, if necessary, and the galangal. Slice the shallots, galangal, and lemongrass and add them to the mortar or food processor along with:
Process or grind until smooth, scraping down the sides as needed. Store refrigerated for up to 2 weeks or freeze for up to 6 months.