In a large skillet over medium heat, melt the butter. Add the sliced onions and cook, stirring occasionally, until they become soft and develop a rich, golden color, around 15-20 minutes.
Stir the rice into the skillet with the caramelized onions, ensuring it gets well coated in the butter and onions. Pour in the beef broth, add a pinch of salt and pepper, and bring the mixture to a boil.
Lower the heat, cover the skillet, and let it gently simmer for 18-20 minutes, until the rice becomes tender and soaks up all the liquid.
Ladle the soup into bowls, top with shredded Gruyère or Swiss cheese if desired, and garnish with fresh parsley.
Add croutons for an extra crunch, reminiscent of traditional French onion soup.