In a small saucepan, combine the garlic, shallot, and olive oil. Set the saucepan over low heat and let the garlic and shallot sizzle, stirring occasionally, until deeply browned and crisp, about 10 to 12 minutes.
While the garlic and shallot sizzle, in a medium bowl, combine the sugar, fennel seeds, rosemary, thyme, tomato paste, chili paste, salt, cumin seeds, and celery seeds. Pour the contents of the pan, including the oil, into the bowl. Whisk to combine well.
Let the mixture cool completely, about 30 minutes, then transfer it to an airtight container and store it in the refrigerator for up to 2 weeks. Before using, let the chili crisp sit at room temperature to loosen up.