Finely chop the onions and garlic. Heat the oil and fry both in it until translucent, then add the rice and fry until it is also translucent. Deglaze with broth, season with salt and pepper. Let simmer until the liquid is absorbed.
Finally stir in the finely chopped basil, butter and parmesan. Let rest for another 5 minutes before serving.