Heat the stock in a medium saucepan over high heat until almost boiling. Remove from heat and cover to keep warm.
Heat oil in a large saucepan over medium-high heat. Add the onion, cook, stirring, for 5 minutes or until soft. Add the garlic and rice, cook, stirring for 1 minute. Add mushrooms, cook, stirring 4 minutes until mushrooms are soft.
Add 1 ladleful of stock and gently stir until stock is absorbed. Repeat with the remaining stock until the rice is tender with just a slight bite. Remove from the heat, stir through the pesto, season with pepper. Scatter over the parmesan and basil if using. Serve.
Tip For vegetarian option replace the chicken stock with vegetable stock.
VARIATION: This risotto is delicious with cooked bacon or pancetta. Roughly chop 100g and cook with the onion in step 2.