Heat oil in a pan over low-medium heat.
Add sugar and let it melt slowly until it turns amber brown (about 2–3 minutes). Stir gently so it doesn’t burn.
Add minced garlic & shallots; and cook for 30–60 seconds until fragrant.
Add the sardines. Gently place sardines into the pan.
Pour in fish sauce, water (or coconut water/coconut Rico) , black pepper, chili flakes. Bring to boil. It will bubble and thicken slightly into a glossy caramel sauce.
Spoon sauce over them. Simmer on low heat for 8–10 minutes, letting the sauce reduce and coat the fish.
Turn off heat and top with green onions. Let it sit for 2 minutes so the glaze thickens and sticks.
