Heat oil in a pan and add garlic and ginger. Saute on a low flame till the raw aroma goes
Add the minced shallots and let them cook on a low flame till they soften and turn translucent. Be careful not to let them brown
Once the onions look like they are almost melting, add ground chilies, soy sauce, vinegar, ketchup, sugar, salt and 1/4 cup water. Mix well
Bring this to a boil and simmer till the sauce thickens. Oil should have separated, and there should be some oil floating on top
Switch off the flame and let it cool. Once the sauce has completely cooled down, transfer to an airtight container and store in the refrigerator