Saute onions and pepper in olive oil in a medium saucepan until just cooked.
Add the garlic, chilies, tomato paste, lemon juice, vinegar, paprika and sugar and stir well to mix. Allow to simmer for 5 minutes, then switch off the heat.
Use a hand blender to blend until smooth. Add the bay leaves, salt and pepper, then add the cooking oil.
Transfer to a sterilized bottle, seal and refrigerate. Every third day or so, invert the bottle. This helps to prevent any mold from forming.