Into a wok/pan, place 2-3 tbsp peanut oil, then add in chilies, shrimp paste, shallots and garlic. Cook for 8 minutes on low-medium heat, covered. Stir occasionally.
Dump mixture into an electric blender or food processor, add in 2-3 tbsp peanut oil. Process until smooth. Dump mixture back into the pan.
Pour in water, start cooking on low-medium heat, add in kafir lime leaves.
Season with vinegar, salt, sugar, brown sugar, and cook for at least 8 mins (until changed in color and thickened).