Preheat oven and a baking dish to 220°C.
Remove stems from the mushrooms. Place mushrooms cup side up into the hot baking dish. Drizzle each mushroom with a little olive oil and season with salt and pepper.
Place mushrooms into the oven and roast for 8-10 minutes until mushrooms are just tender.
Remove baking dish from oven and crumble over the ricotta, sprinkle with mozzarella. Return dish to the oven and bake 3-4 minutes until cheese is melted.
Drizzle pesto over each mushroom and serve.