Preheat the oven to 220°C (gas mark 7).
Place the tomato slices and onion wedges in a bowl, then add the olive oil, gently stir together and season with salt and pepper and the sugar. Trim the pastry into a 25-30cm (10-12in) rectangle and transfer to a baking sheet.
Arrange the tomato and onion on the pastry and rows, leaving a 1cm (1/2in) border all the way round, then dot spoonfuls of the goat’s cheese at regular intervals on top of the tomatoes and onion.
Bake for 20-25 minutes or until the pastry is golden and the tomatoes cooked through and bubbling hot. Remove from the oven and drizzle with the pesto, then serve immediately.
Recipe courtesy of Rachel Allen