Combine the water and the glutinous rice flour in a small pot. Mix well with a wooden spoon and let it cook over medium heat for about 10 minutes until it starts to bubble. Add the sugar and cook 1 more minute, stirring. Remove from the heat and let it cool off completely.
Pour cooled porridge into a large mixing bowl.
Measure out the fermented salted shrimp, squeeze the liquid into the bowl, then finely mince the shrimp, adding to the porridge.
Add the garlic, ginger, and onion to a small food processor and make a puree. Add to the porridge.
Add the fish sauce and desired amount of hot pepper flakes. Mix well with the wooden spoon until the mixture turns into a thin paste.