Place the butter, sugar, ground almonds, salt and vanilla in the bowl of a mixer and beat until well combined. Add the eggs, one at a time, while beating and incorporate fully. Scrape the bowl, if needed, between additions. Add the flour and beat until smooth.
Transfer the dough to a clean surface and shape into two discs. Wrap in plastic wrap and refrigerate for a few hours, or overnight.
Remove from refrigerator when ready to use, roll out between two sheets of parchment, or a silicone mats, to your desired thickness. I like a slightly thicker tart shell for that added texture contrast, but also like them thinner depending on the filling.
Press the tart mold into the rolled dough to cut the base. Take a pizza or pastry roller or knife to cut strips to wrap around the edges. Use a knife to trim away the edges. Transfer the shells to the refrigerator for an hour to chill.If you don't use tart rings, cut your rolled dough slightly bigger than your baking tin and press into the tin, tuck in the corners and trim the edges, as needed. Use a fork to prick holes in the dough, then chill, as above.
Once chilled, prebake/blind bake the shells for 15-20 minutes at 375ºF. Allow to cool before filling. If using a regular tin, you may need to add pie weights for the first 5-7 minutes of baking. These aren't required if using the type of mold I used here. Also, if your pastry is properly chilled, you shouldn't need weights.
Whip up the filling:
Add the butter and sugar to a mixer bowl and beat until pale and fluffy. Add the ground almonds and flour continue mixing until combined. Crack the eggs into a small bowl and add one at a time to the almond mixture, mixing well between each addition, followed by the rum, if using. Continue mixing to a light consistency. If not using straight away, transfer to an airtight container and refrigerate for up to a week.
Assemble and bake:
Heat oven to 375ºF/190ºF.
Line a perforated sheet pan with a silpain mat mat and arrange the cooled pre-baked tart shells, still in their ring/molds, on the mat.
Wash and dry the fruits. Pit the apricot and cut in half, then quarters. The berries are left whole.
Pipe or spoon the filling into the shells and use an offset/angled spatula to smooth out the filling. Lightly press the fruits into the filling and bake for 25-35 minutes, or until the tops appear golden brown.
Remove from the oven and place on a cooling rack. Let cool slightly and lightly brush with apricot glaze or jam, if using. Cool completely before serving.