Method
Soften the chiles
Cover chiles with boiling water and soak 10 minutes. Drain. Blend with shallots, garlic, belacan and 2 Tbsp fresh water until nearly smooth.
Fry the paste
Warm oil over medium heat. Add paste and stir often for 8–12 minutes until darker, shiny and fragrant. If it catches before the shallots soften, add water a teaspoon at a time.
Add the beans
Stir in petai, tamarind, sugar and 3 Tbsp water. Cover and simmer 2–3 minutes until the beans are crisp-tender.
Finish the shrimp
Add shrimp and turn in the sauce for 2–4 minutes until firm and opaque through the centers. Taste before adding salt. Spoon onto hot rice.
Shelled edamame gives you a milder variation if petai is hard to find. Cook it according to its packet before adding.

