Sprinkling crispy fried shallots and garlic over cooked food before serving isn’t merely about aesthetics. They add flavor, texture and aroma that give panache to Asian dishes.

Crispy fried shallot is bawang goreng in Indonesia. But it isn’t just in Indonesia where you’ll find it over rice, soup, noodles, congee, meat and seafood. The same garnish is found in Malaysian and Thai cooking too.
Crispy fried garlic, on the other hand, is even more popular in Southeast Asia. It is an important garnish in Thailand, Vietnam, Indonesia, Malaysia and the Philippines.
The thing about living in Asia is that we can buy both crispy fried shallots and garlic in most supermarkets at inexpensive prices. Today, at least, that is the situation because most Southeast Ascian countries now make and export the condiment.

Back in 2012, only Malaysian bawang goreng was available in the Philippines and very few supermarkets sold it. Fried garlic was a little easier to source. As Asian cuisines rose to international fame (Thai and Vietnamese cuisines, especially), condiments became popular exports.
If, however, you are not based in Asia, these two condiments may not be as easy to find. The good news is that, if they are unavailable in your neighborhood, you make both at home. All you need is a sharp knife, a thick-bottomed frying pan, cooking oil and, of course, shallots and garlic.

For fried garlic, start by peeling and chopping garlic. To avoid burning them during frying, use a heavy pan with a thick bottom. Set the stove to medium and pour in the oil. Spread the garlic in the hot oil, stir until they are just starting to brown then turn the heat down to low and continue cooking over low heat.
How much oil to fry the chopped garlic in is really a matter of preference. More oil means the garlic bits will cook more uniformly. But because garlic burns fast, and the the bits will continue to cook after the heat has been turned off, you will need to work fast to scoop them out of the oil. A kitchen spider with a fine mesh should do the trick.
If you’re not very confident about pulling out the garlic in time, or you don’t have the correct kitchen spider, I suggest using less oil. Just stir often to allow even browning. When the garlic bits are crisp and browned, just push them to one side, tilt the pan and let the oil drip away from them. They stop cooking faster that way.
What do you with the oil in which the garlic bits were fried? Cool the oil, pour into a jar, cover and store. Can you imagine how flavorful that oil is?

Fried shallots on the other hand involves frying sliced shallots over low heat in plenty of oil. Butterkicap has good instructions.
Update on May 2, 2020:
I almost forgot… There is a gourmet version of fried shallots that we discovered in Taiwan.

Crispy fried shallot soaked in good oil. Sounds decadent, doesn’t it? it’s delicious! We were browsing the grocery at the basement of Taipei 101 and so many sellers were offering free samples. One of them offered a small paper cup with about tablespoon of rice topped with fried shallot. It was so good that I was already inspecting the label on the jar even before I finished chewing.

We bought a jar. It was far from cheap but really worth its price.
Back home, there were many late nights when I just spooned fried shallots dripping in goose oil over hot rice when I was working and I needed a quick snack.