Prepare the pastry
Combine the flour, salt, and sugar. Cut in the butter until the mixture resembles coarse crumbs. Add the egg and enough ice water for the dough to come together. Form into a disk, wrap, and chill for at least 30 minutes.
Roll the dough into a 9-inch tart pan. Prick the bottom with a fork and blind bake at 375°F (190°C) for 12–15 minutes.
Prepare the filling
Sauté the shallots until soft. Add the garlic and cook for another 30 seconds. Let cool
In a bowl, whisk together the ricotta, Parmesan, eggs, shallots, garlic, Herbs de Provence, salt, and pepper. Add the shallot/garlic mixture.
Spread the pesto over the baked crust, then pour in the ricotta mixture. Arrange the tomato slices over the filling, alternating colors for a beautiful presentation.
Bake for 40–45 minutes, or until the filling is set and the crust is golden brown.
Allow the tart to cool for 10–15 minutes before garnishing with fresh basil.