Heat a large saucepan on a low heat and then dry fry the onion until it has browned slightly. If it starts to stick, add a little water.
Add the crushed garlic and cook for a further 2 minutes.
Meanwhile, put 100g peas into a food processor with a ladleful of stock and whizz until completely pureed.
Stir the rice into the onion and then pour in the wine (if using, if not add a ladleful of stock).
Continue cooking like this, adding a ladleful of stock at a time, and stirring continuously until the rice is tender and has a good creamy consistency. This can take around 30 minutes.
Stir in the pureed peas, remaining peas and some seasoning.
When serving, top for a spoonful of pesto, recipe below.