Preheat the oven to 400 degrees.
Thinly slice the tomatoes crosswise and set aside. If you have cherry or grape tomatoes as well, keep them whole.
On parchment paper, roll the dough out to a 9x11 rectangle and trim any uneven edges. Prick the dough with a fork every few inches, leaving at least a half-inch border all around. Place parchment paper with tart on top of a baking sheet.
Whip the ricotta and one tablespoon of olive oil with an electric mixer or whisk until smooth and creamy — about two minutes.
Spread a thin layer of the ricotta onto the phyllo dough leaving the half-inch border. Sprinkle with cracked pepper and sea salt. Place the extra ricotta in the fridge.
Arrange the sliced tomatoes on top of tart, overlapping slightly. Add the sliced shallots. Whisk the egg and brush the dough border with egg wash.
Bake for about 25-30 minutes until golden.
Remove from the oven. Dollop with the fresh ricotta, drizzle with pesto and garnish with basil leaves and flaky sea salt. Enjoy right out of the oven or at room temperature.