Drain the ricotta by placing it in a fine colander or strainer over a bowl and placing a plate and then a heavy weight on top of it. Set aside while you prepare all of the other ingredients. It is very important to do this otherwise the mixture may be too wet.
Slice the silverbeet or spinach, including stalks.
Steam or boil the silverbeet or spinach for 4 minutes. Drain and leave to cool in a colander.
Melt the butter in a large pan, add the onion and bacon and gently cook until the onion is soft, about 10 minutes. Remove from heat and set aside in a large bowl to cool for 10 minutes.
In the meantime preheat the oven to 150C and butter a 20cm springform tin and line with baking paper. You could also use a small baking dish.
With your hands squeeze as much water as possible from the silverbeet or spinach and add it to the onion mixture.
Stir in the eggs, ricotta, parmesan, herbs, salt and pepper and mix well. Sprinkle the pine nuts over the top if you're using them.
Pour the mixture into the tin and place the tin on a baking tay before putting it in the oven for about 1 hour, until cooked through. Cover the top with baking paper if it is browning too much during the cooking time.