Add green beans into a large skillet and cover with water. Salt the water generously. Bring the water to a boil, then reduce heat to medium-low. Simmer and cook the beans until they are tender to your preferred texture. Drain the green beans.
In the same skillet, remove all excess water. Melt butter or add olive oil. Add the onions and garlic, and cook until onions and garlic are softened and lightly browned. Add green beans and cook until heated through, about 1 minute.
Season with salt and pepper to taste. Add lemon zest and squeeze of fresh lemon juice. Serve warm.