Saute onion in a little water. Add garlic and rice and stir. Add stock and bring to the boil.
Transfer mixture to a baking dish, cover and bake at 180C for 30 minutes.
Remove from oven and fluff rice with a fork.