Dry roast 1 cup dried red chillies, roughly chopped in a pan on medium heat, until toasted (about 2 minutes) Keep stirring to avoid burning the chillies.
After the chillies darken add 1/2 a cup of water to the pan and stir on the heat for another minute. Take off the heat and put aside for the chillies to soften and soak in the water.
In a fresh pan add all the ingredients except for the shrimp paste, vinegar and the dried chillies, and the oil and sauté on a medium heat until the onions are translucent (around 2 minutes).
Add 1 tablespoon shrimp paste and sauté for another 5-8 minutes. Keep stirring until the onions caramelise.
Add 1/2 cup coconut vinegar and cook until it becomes a thick sauce. About 2 minutes.
Add the toasted chillies with the water and cook for another 2 minutes.
Take off the heat and allow it to cool.
Put into a food processor with 3 tablespoons lime juice and blitz it to your preferred consistency. You can keep it chunky or make a smooth paste.
Serve it as a condiment or complement fried chicken, put in stir fries or on grilled meats.