Make the shortcrust - In a food processor, combine the flour, sugar, and salt and pulse until combined. Cut margarine into small cubes. Then slowly add the margarine, coconut oil pulsing all the while, until you get a coarse meal. Then slowly add the milk and pulse until a dough ball forms. Flatten dough into disks, wrap in wax paper and pop in the fridge for at least 30 minutes.
Make the raspberry jam - put the raspberries, sugar and lemon in a sauce pan. Cook on a medium heat until the fruit breaks down. Simmer for 5-10 mins, continue stirring to reduce and thicken. Remove from the heat, transfer to a bowl. Allow to cool.
Make the frangipane - In a stand mixer, combine almond flour. White flour, cornstarch, baking powder, sugar. Add coconut oil, almond milk, almond essence and mix until well combined.