Wash and dry fresh spinach, and chop finely, or drain thawed spinach. Set aside.
In a small bowl, combine coconut, cumin, cayenne, turmeric, and salt with enough water (about 1/4 cup) to make a thick paste. Add green chile, and stir. Set mixture aside.
In a wok or large skillet, heat oil over medium-high heat. Add mustard seeds; when they begin to pop, toss in dried chiles, curry leaves, and shallots, and fry until shallots begin to soften but not brown, about 2 minutes. Add spinach, and cook, stirring constantly until spinach is half cooked, about 5 minutes. Stir in coconut paste, and continue cooking, stirring constantly, for another 5 minutes or until the spinach is tender. Remove from heat, and adjust seasoning.