Preheat the oven to 350°F (175°C).
In a large bowl, combine the green beans, cream of mushroom soup, shredded cheddar cheese, milk, salt, and pepper. Stir well to combine.
Transfer the mixture into a greased casserole dish.
Bake in the preheated oven for 25 minutes.
Remove the casserole from the oven and sprinkle the fried onions on top.
Return the casserole to the oven and bake for an additional 10 minutes, or until the onions are golden brown and crispy.
Serve hot and enjoy!