Heat 2 tablespoons oil in the now-clean skillet. Add the onion, garlic, and shallots, stirring until they become fragrant, which should take about 1 or 2 minutes. Mix in the chili paste and continue to cook for 10 minutes, stirring occasionally. If the paste seems too dry, a small amount of water can help loosen it.
Stir in the remaining anchovies and cook for another 5 minutes. Finally, add the salt, sugar, and tamarind paste. Let the sauce simmer until it thickens, which usually takes about 5 minutes, until it coats the back of a spoon.