Put the coriander seeds and peppercorns into a small, cast-iron frying pan and set over medium heat. Stir the spices until they emit a roasted aroma and turn half a shade darker. Empty into a clean coffee-grinder or other spice grinder and grind as finely as possible. Put in a bowl. Add all the remaining ingredients for the sauce and mix well with a small whisk.
Just before eating, put the oil in a large, preferably non-stick saute pan and set over medium-high heat. When very hot, put in the mustard seeds. As soon as the seeds begin to pop (a matter of seconds), put in the shallots. Stir and fry for 30 seconds. Put in the garlic and ginger and continue to stir and fry for 30 seconds or until the shallots have browned a bit. Put in the shrimp and stir a few times. Add the chayote. Continue to stir and cook for a minute. Sprinkle lightly with a little salt, pepper and cayenne. Stir to mix. Add the coconut milk mixture and turn the heat down to medium low. Stir and allow the shrimp and chayote to cook through gently. As soon as the shrimp are opaque, stir in the basil and serve.
*To make the tamarind paste, break off a walnut-sized lump from a brick of tamarind. Break this further into small pieces and put in a bowl. Cover the tamarind just barely with hot water and leave to soak overnight or at least 4 hours. Mash up the tamarind with your fingers and then pass the pulp through a coarse sieve.
Recipe courtesy of Madhur Jaffrey