First boil the spinach and keep aside to cool. Once it cools down, using a blender puree spinach into a smooth paste.
Then in a kadhai or flat bottom pan, heat the oil. Add chopped or sliced onions and sauté it until brown.
Then add ginger & garlic paste and green chillies to it and sauté for another couple of minutes. Let the onions cool down. Blend it in the blender and put it back it in the pan along with the tomato puree. Stir for a few minutes so that the tomato is cooked and the raw smell is gone.
At this time you can add all the spices, which is salt, turmeric, red chili powder, garam masala to the mixture. Also add the pureed spinach and mix everything well. Cook it covered on a slow heat for about half hour to 45 minutes. If the spinach and the onion mixture mixed together looks thick then you can add a a little water to it.
The longer the spinach is cooked, the better it is. You can also cook it in a slow cooker. Make sure you check all the spices. Add paneer cubes so it can be cooked in it for a good few minutes so all the flavors can marry.
You can put a little bit of butter if you choose to. Enjoy this delicious Palak Paneer with your choice of roti, naan or a paratha.