Combine the cumin seeds, ground coriander, tumeric powder, curry leaves and the sliced chilli in a small bowl.
Add oil to the saucepan, add the mustard seeds and cover with a lid. Turn the heat up until you hear the mustard seeds popping, then turn the heat to low. Once the mustard seeds has stopped popping add the herb mixture and quickly put the lid back on.
As soon as you hear the herbs frying, quickly add the onions and garlic and green capsicum, and saute for a few minutes until tender.
Add the spinach, sweetcorn and green peas. Mix well then add the baked beans. Cook for a few minutes and add the freshly sliced coriander.
Season with salt and pepper and chilli powder. Remove from heat, pour into a baking dish or casserole dish and smooth it out.
Meanwhile, peel the potatoes, slice into small chunks and boil in lightly salted water. When tender, drain, pour into a pot, add butter, salt, and milk, and mash until smooth.
Spread the mashed potatoes on top of the baked bean mix. Use a fork to make ridges on top of the mashed potato This makes it crispy when baked.
Bake until topping is golden brown (20-25 minutes) at 180C.