Bring a small pan with 200ml of salted water to the boil. Add the quinoa and simmer for 20 minutes. Drain and set aside.
Meanwhile, peel and finely chop the onion. Wash and chop the thyme leaves. Wipe the mushrooms. Remove the mushroom stalks and finely chop. Chop the pine nuts and pistachios and set aside.
Heat the oil in a frying pan. Add the chopped onion, mushroom stalks and thyme leaves, sprinkle with a little salt and cook over a low heat for 5 minutes.
Remove the pan from the heat and add the ricotta, cooked quinoa, chopped nuts and a generous grinding of black pepper. Stir well to combine.
Spoon the ricotta and quinoa mixture into the mushroom cups and place on a greased baking sheet. Bake for 15 -20 minutes until the mushrooms have softened and the topping is light golden brown in colour.