Preheat the oven to 350 degrees.
Place pastry squares onto the baking sheet.
Spread the inner rectangle of each piece of pastry with a little pesto sauce.
Sprinkle the Parmigiano Reggiano on top.
Divide the tomatoes between the tarts, then season with salt and pepper to taste.
Brush the pastry edges with beaten egg or milk, then bake for about 15 minutes.
Sprinkle the pine nuts over the tarts and then bake for an additional five minutes, until the pastry is risen and crisp.
Cool for a few minutes, garnish with shavings for Parmigiano Reggiano, then serve.