Heat the oil in a pan, then gently sauté the shallot and garlic until soft.
Add the tomatoes, cut them up with a wooden spoon, then cook for 15 minutes, stirring occasionally.
Take it off the heat, add the parsley and purée it with a hand-held mixer.
Add the sugar, vinegar, cinnamon, chilli (if used) and cook at a low temperature for 25 minutes, under a lid. If needed, add some water. It should be thick, but still liquid.
Taste, and season it to your liking.
You can use it immediately or let it cool and transfer it into jars (to be kept in the fridge) or plastic containers (for the freezer).