Finely chop the onion and garlic.
Heat the oil in a heavy based saucepan and gently sauté the onion and garlic for 5 minutes.
Add the rice, stir for a minute,then pour over the wine.
Meanwhile, heat the stock in another saucepan and leave it simmering.
When the wine has evaporated, add a large ladle of hot stock and stir until the liquid has absorbed. Then add another ladleful. Keep doing this for about 20 minutes, until the rice is cooked - the result should be creamy and al dente i.e. have a bite.
When the rice is cooked, turn off the heat, then add the butter and the parmesan. Season with salt and pepper, combine gently, then cover with a lid.
Rest for 2 to 3 minutes, then mix in the chopped parsley and serve immediately.