Heat a large, heavy-based saucepan over a medium-high heat and add in your fennel seeds - you want to dry fry them for 2-3 minutes until they are fragrant.
Put the toasted fennel seeds in a pestle and mortar and lightly crush.
Turn the heat down on the pan to medium, add the oil, and when hot, add the diced shallots. Cook until softened and translucent - around 6 minutes, stirring regularly.
Stir in the grated garlic and ground fennel seeds, then cook for 2-3 minutes, until fragrant.
Put the diced tomatoes, chillies, sugar and the vinegar in the pan and stir well. Bring to the boil and then turn the heat down to a simmer. Cook the jam for approximately an hour, stirring now and again with a wooden spoon to ensure it doesn't stick to the bottom.
When the jam has thickened and the spoon leaves a trail through the mixture, it is ready. Using a ladle, pour the hot jam into your sterilised jam jars (I find it easier to use a funnel). Pop the lids on tight and leave the jam to cool completely.
Stored in a cool, dry place, the jam will keep for up to a year. Once opened, store in the fridge and use within 2-3 months.
Notes
If you want to 'turn up the heat' feel free to add in more red chillies. If you prefer a milder jam, make sure to remove the seeds before chopping. If you want it extra spicy, leave the seeds in or add even more chillies!
I would suggest making a smaller amount of the recipe to test your levels of 'swicy-ness' before going ahead and making a big batch.