Preheat the oven to 230C.
Add the garlic, onion, aubergine, half the oil, ¼ teaspoon of salt and a good grind of pepper to a 30 centimetre shallow cast iron pan. Mix well and roast for 20 minutes until golden and softened.
Meanwhile, mix the remaining oil with the butterbeans, pesto, tomatoes and ¼ teaspoon of salt. Spoon the butterbean mixture over the aubergines and roast for a further 15 minutes until some of the butterbeans have slightly charred in places.
Serve alongside the yoghurt and coriander if using.