In a skillet over medium-high heat, brown the onion in the oil. Add the garlic and ginger. Cook for 1 minute. Add the tomatoes, coconut milk, garam masala, chili pepper, if using, and salt. Simmer over low heat for 10 minutes.
Add the shrimp. Bring to a boil, reduce the heat and simmer for 3 to 5 minutes. Add the lime juice and sprinkle with coriander leaves. Adjust the seasoning and serve.