In a large pan over medium heat, add olive oil and sliced onions. Season with salt and ground pepper to taste.
Stir onions in olive oil until they start to slightly brown. Lower heat, and continue to stir onions until they are golden brown in color and soft in texture.
While onions cook, place trimmed green beans on a greased baking sheet. Top with salt and pepper to taste.
Bake green beans for about 15-20 minutes, flipping halfway through.
Once green beans are out of the oven, top with caramelized onions.