Put a pot of water on to boil for the pasta. Aim to cook to just under al dente
Prepare your ingredients. Slice the onions, mince the garlic and tear the mushrooms into petals.
In a large pan, cast iron is best. Add the oil and bring to a medium heat.
Add in the oyster mushrooms with some salt and pepper.
Now get another cast iron pan and rest it on top of the mushrooms to help draw out the moisture and encourage browning.
Occasionally mix the mushrooms, then apply pressure with the pan again until the liquid has been release and they are evenly browned.
Add in the onions and fry with the mushrooms.
When the onions are browned, add in the pasta and pesto to the pan.
Mix and add more pasta water if it feels a little dry.