Peel and thinly slice the shallots or garlic, then pat dry with paper towels.
Heat the oil in a wok over medium low heat and stir-fry the sliced shallot or garlic until golden brown and crispy, 3 to 5 minutes. Do not allow them to burn or they will taste bitter. Drain well using a wire mesh sieve and allow to cool completely, then store in an airtight container