Heat 2 tbsp olive oil in a large pan and gently fry the onions and garlic until softened.
Stir in the rice and cook for 1 minute.
Gradually add stock, one ladleful at a time, allowing each to absorb before adding more.
Continue cooking and adding stock for about 20 minutes until the rice is tender.
Spread the rice over a tray to cool and firm up.
Preheat the oven to 180C (fan 160C) or gas mark 4 and butter a 22cm deep-sided tin.
Fry mushrooms with thyme and butter in the same pan until golden, then mix with the cooled rice, parmesan, ricotta, eggs, and seasoning.
Press the rice mixture into the tin, top with remaining mushrooms, taleggio, and thyme, then bake for 25-30 minutes until golden and crisp. Cool, slice, and serve.