Blend shallots, garlic, terasi, and chili until really smooth. Then add in salt and sugar to taste
Heat the oil, then saute everything, until a bit bubbly
Add in washed petai, either halved or full round ones, stir well
Taste the cooking, if its tasty enough, wait until petai tender a bit (not hard, which means its cooked).
Serve with hot rice and other side dishes.