If you are using fresh spinach; wash thoroughly, roughly chop and blanch it in a little water. Remove from heat, let cool and purée.
Steam corn kernels in a steamer. It usually takes about 15-20 mins for them to become soft.
Simultaneously, heat oil in a pan. Once the oil is hot, add garlic and green chillies. Sauté for a couple of minutes till the garlic just start to brown.
Add the chopped onions and sauté for another 4-5 minutes till the onions become soft.
Now add the spinach purée and all the spices. Cook for another 5 minutes. Don't cook too long as the spinach will then lose its bright green colour if overcooked. Remove from heat and coarsely blend together with a stick blender.
Return to heat, add the steamed corn kernels. Cook covered for 2-3 minutes.