Place a pot over medium heat and once it is hot, add oil to lightly coat the bottom. Add the shrimp shells and heads. Sauté until they are browned and smell flavorful, then add the water and 2 teaspoons salt.
Bring the pot to a boil, then lower the heat to maintain a gentle simmer. Cover and simmer for 45-60 minutes (or longer for stronger flavor). You can prepare the aromatics and dipping ingredients during the simmering time.
Use a pestle and mortar to roughly pound/crush the galangal, garlic, and shallots. We will start cooking the tomatoes and all the aromatics about 10-15 minutes before the shrimp stock is ready.
In a clean pot, heat some cooking oil over medium heat. Add the tomato wedges (reserving a few wedges for serving) and chopped red chilies. Cook until the tomatoes are fully softened, about 5 minutes.
Add the galangal, lemongrass and kaffir lime leaves to the pot while reserving just a small amount to add when serving the hot pot. Also add all of the garlic and shallots. Sauté and continue to cook until it is very fragrant and all the aromatics have been softened, about 5 minutes.
Once the shrimp stock is ready, discard the shrimp heads and shells. Pour the stock into the pot with the tomatoes and aromatics. Bring it to a simmer, then add the tamarind paste, sugar, fish sauce and remaining salt.
Cover and simmer for about 20 minutes (up to 30 minutes) to let the flavors combine. Taste and adjust to your liking. Discard all the solid ingredients, leaving just the fragrant and flavorful broth.