Put the coriander seeds, cumin seeds, peppercorns, cayenne pepper, paprika, and turmeric in a grinder or mortar and pestle. Grind finely as possible then empty into a bowl.
Add the ginger, garlic, and 4 tbsp water, or enough to make a thick paste. Stir to mix and set aside.
Pour the oil into a large, nonstick, lidded frying pan or well-seasoned wok and set over medium-high heat. When the oil is hot, add the onion. Stir fry until the onion is translucent.
Add the spice paste. Stir fry for 2 minutes. Add 1 1/4 cups of water and bring to a simmer. Cover, reduce the heat to medium-low, and simmer for 10 minutes.
Add the coconut milk, salt and tamarind paste. Mix well and bring to a simmer again. Add the shrimp and simmer gently, stirring frequently, until cooked through.
Garnish with cilantro and serve with steamed rice, naan or chapati.