Preheat oven to 375°F (190°C).
Heat oil or butter in a pan. Add onions and cook slowly until soft and lightly golden.
Add ground beef. Cook until browned and no longer pink. Drain excess fat well.
In a bowl, mix French onion soup with beef broth.
In a baking dish, combine beef mixture, uncooked rice, soup mixture, and pepper. Stir gently.
Cover tightly with foil and bake for 35 minutes.
Remove foil, stir once, add cheese if using, and bake uncovered 10 more minutes until rice is tender.
Rest 5 minutes before serving.