Preheat the oven to 200ºC, gas mark 6.
Unroll the pastry sheet and lay it out on its baking parchment on a large baking tray.
Use a knife to score a 2cm border around the edges of the pastry, taking care not to cut all the way through the pastry, then prick the centre all over with a fork.
Brush the edges with the egg and bake for 10-15 minutes until golden and cooked through.
Leave to cool for 5 minutes, then gently press the middle section down.
Meanwhile, finely slice the tomatoes, then transfer to a sieve and sprinkle over a little salt; set over a bowl to drain for 10 minutes.
Roughly chop the capers and most of the basil (reserving a few smaller leaves), then tip into a large bowl with the garlic, chilli flakes and 1 tbsp oil.
Stir in the drained tomatoes; season if needed.
In a small bowl, use a fork to whisk together the tapenade and remaining 1½ tbsp oil.
Carefully transfer the cooled tart case to a large serving board, then dollop over the tapenade mixture and spread out to thinly cover the base.
Arrange the tomatoes on top, followed by the anchovies.
Scatter over the reserved basil leaves and some freshly ground black pepper.
Serve with a green salad, if liked.
