In a medium pot over medium-low heat, add butter, and let melt. Add the onion and garlic, stirring frequently, until the onion becomes translucent, about 4 to 5 minutes. Don't let the vegetables brown.
Add rice; cook and stir for 1 minute.
Stir in wine; cook until liquid is absorbed.
Add 2 cups of warm chicken broth to the rice mixture; stir until the liquid is absorbed. Repeat 2 times.
Add a last cup of warm broth (cup 5), and cook the rice in the chicken broth until the rice absorbs the broth, stirring often.
The whole cooking process should take about 20-25 minutes. If the rice is not ready, add ½ cup more of chicken broth and keep cooking until close to al-dente.
Remove from heat; stir in parmesan cheese. Serve with pepper and salt, if desired.
Serve the risotto hot, garnished with chopped fresh parsley or basil if desired.