Pre-heat the oven to 180°C.
Cut the tomatoes in half and put them in a baking tray.
Cut the onion in half and tuck these between the tomatoes. Add the garlic cloves (with skin on).
Drizzle with olive oil, then scatter the herbs & chilli flakes on top, season with salt & pepper.
Bake in the oven for about 25 minutes, until the tomatoes are tender and have released some of their juice.
Drain the beans and add to the tomatoes. Turn off the oven but keep the tray in there for five minutes to allow the beans to warm through.
Take the tray out of the oven, transfer the tomatoes& beans to a serving plate. Remove and discard the skin of the onion, then cut the flesh into thin slices and add to the beans.
Squeeze the garlic flesh out of their skin and mix this with the cooking jus. You can add more balsamic vinegar and/or olive oil, if you like. Pour it over the tomato and bean salad.
Stir in the basil leaves, season to taste and serve immediately.