In a small pot over medium heat, sauté the shallot and garlic in the butter until tender. Add the spices and cook for 1 minute, stirring. Add the remaining ingredients. Cover with a splatter guard and cook for 10 minutes, stirring occasionally.
In a blender, purée the sauce until smooth. Return to the pot and cook a further 10 minutes, with the splatter guard, until the sauce thickens, stirring occasionally. The tomato-based barbecue sauce will keep for 10 days in an airtight container in the refrigerator.