Blend the shallots, garlic, turmeric, half of the red onions, shrimp paste, dried prawns, curry powder, garam masala, chilli paste and 100ml water until smooth, for about 15 seconds. Set the blender aside.
Cut the okra by removing the tips, and cutting the body slantingly, about 1/2 cm thick. Set them aside.
Add the cooking oil and sambal paste to a pan over medium heat. Scrape the sides of the blender to get it all out. Stir until combined, for about 1 to 2 minutes.
Strip the curry leaves from the stems and add them to the pot with the rest of the red onions. Stir to mix for about 6 minutes, or until slightly dry and paste-like.
Add the okras, salt, sugar and 200ml of water to the sambal paste. Stir until well combined. If the Okra Sambal is too thick, add another 100ml of water. Stir and cook for another 3 minutes for just-cooked, crunchy okra, or 6 minutes for tender okra.
Taste and adjust as preferred. Switch off the heat.
Serve hot with some white rice.