Cook the brown rice in plenty of salted water for twenty-five minutes until al dente, then drain.
Meanwhile, finely chop the onion, garlic, ginger, and red chili pepper. Heat the coconut oil in a large pan and sauté the onion for five minutes. Add the garlic, ginger, chili pepper, curry paste, and turmeric, and cook for two minutes until the paste darkens and the oil turns red.
Dice the tomato and cook for two minutes. Pour in the coconut milk, bring to a boil, and let the sauce simmer gently for five minutes until slightly thickened.
Pat the shrimp dry and stir them into the sauce. Let them simmer gently for two to three minutes, just until they are pink and opaque throughout, then immediately remove the pan from the heat. Shrimp can overcook in under a minute, becoming rubbery, and they will continue to cook in the residual heat of the sauce anyway.
Stir in the spinach in batches until wilted, and season the curry with lime juice and salt.
Serve the curry over the rice and garnish with plenty of cilantro and a lime wedge.