Boil sugar, water, and basil in a saucepan until the sugar dissolves.
Cool slightly, then blend until smooth and pass through a sieve.
Strain the mixture again through a clean muslin cloth and let it cool completely.
Churn the mixture in an ice cream machine and freeze until solid.
Preheat your oven to 220°C.
Boil milk and basil in a saucepan for the cream filling.
Whisk egg yolks, sugar, and cornflour together, then whisk in the hot milk.
Cook the mixture over gentle heat while stirring until it thickens.
Cut pastry into four 13cm squares, place on a tray, brush with egg, and score a border.
Spread the cooled basil cream onto the pastry squares up to the scored edges.
Top with blackberries and almonds, then bake for 15 minutes until golden.
Serve each warm tart topped with a scoop of basil sorbet and fresh basil.