Dry roast the ingredients to "roast and grind" over medium heat, till the coconut turns medium brown in color. Keep stirring so as to get all parts of all ingredients equally roasted. Transfer to a plate and let it cool.
Grind to a fine paste, adding water as needed, in a mixer/blender/food processor.
Heat the oil in a wide bottomed pan. Add the mustard seeds and let them splutter. Add the curry leaves. Pour the ground paste to it.
Add the turmeric, cayenne,garam masala and salt and sauté well.
Grind the tomatoes in a food processor until almost smooth and add to the pan.
Let it cook for a while, till the tomato thickens and the sauce looks like its all mixed well together.
Now add the shrimp and reduce heat to medium-low. Give it a good stir. Let it cook for just a couple of minutes till the shrimp is cooked. They will turn pink when cooked. You don't want to overcook them. So, be watchful.
Remove from heat and add the chopped cilantro as garnish.
Enjoy with rice, rotis, bread or whatever you choose to enjoy it with.