Place the flaked almonds in a bowl, cover with plenty of boiling water and set aside to soak for 30 minutes.
Drain them well then place in a blender with the lemon juice, nutritional yeast, garlic, water, salt and onion powder. Blend until they are almost smooth but still have a slightly grainy texture. You will most likely need to stop and scrape down the sides a couple of times. If your blender has a tamper tool, use it. If you really need to you can add a drop more water to get the mixture moving but don't add too much or your ricotta will be too runny.
Crumble in the tofu and blend again until smooth but slightly grainy. Transfer to a bowl.
Squeeze as much of the excess water out of the defrosted spinach as you can then roughly chop it and add it to the ricotta mixture. Taste and add more seasoning as needed.
To make the marinara sauce, heat the olive oil in a large pan over a low heat. Add the onion and cook gently for 10-15 minutes, stirring often, until soft and translucent.
Add the crushed garlic and cook for another minute then add the tinned tomatoes, passata, chopped basil, oregano and chilli flakes if using along with some salt and pepper.
Simmer for about 20-30 minutes until reduced slightly, then taste and add more salt and pepper as needed.
Meanwhile, cook the pasta shells according to the packet directions but for about 2 minutes less. They should be al dente or slightly less.
Preheat the oven to 200°C/400°F/gas mark 6.
Pour the marinara sauce into a large casserole or lasagne dish. (I used two smaller dishes rather than one big one).
Fill each pasta shell with a heaped spoonful of the ricotta mixture and arrange them filling side up on top of the sauce.
Cover the dish with tin foil and bake for 15 minutes. Recuce the heat to 180°C/350°F/gas mark 4 and remove the foil. Bake for another 10-15 minutes.
While the shells are baking make the parmesan (if using). Place the cashews, almonds, nutitional yeast, garlic powder, onion powder and ¼ tsp salt in a food processor or blender and blitz until it reaches a powdery consistency with a few larger pieces. Be careful not to go too far or you will end up with nut butter.
Taste and add more salt as needed. The parmesan will keep in a jar at room temperature or in the fridge for up to a month. Sprinkle some over the pasta shells just before serving.