Heat the oil in a saucepan and sauté the onion, garlic, red pepper and shrimp paste in it for two minutes. Add coconut milk, sugar, bay leaves and salt to taste. Bring to a boil, reduce heat, and simmer for five minutes.
Add the beans and simmer for twenty minutes. Two minutes before serving, add tamarind juice.