Place chiles in a small bowl of warm water to soak for 20 minutes. Combine the peppercorns, coriander seed and cumin seed in a mortar and grind to a powder with a pestle, or use a spice grinder. Set aside.
Trim any grassy tops and hard roots off the lemongrass, then finely chop the stalk. Place the lemongrass, cilantro, galanga and lime peel in the mortar and grind to break them down. Add the garlic and shallot and grind until a moist paste forms, about 5 minutes.
Drain the chiles and add them to the paste in the mortar. Add the spices, shrimp paste and salt and grind well. Transfer paste to a jar, cover tightly and refrigerate.