Preheat oven to 400 degrees.
Combine green beans, shallots, garlic and thyme in a large bowl. Coat with olive oil. Spread evenly on a baking sheet (you can line it with parchment, if necessary.) Sprinkle generously with sea salt and a few grinds of black pepper.
Roast for 20 minutes, stirring after 10 minutes.
Transfer the beans and shallots to a serving bowl and add lemon zest and juice. Toss to coat and season with additional sea salt and pepper to taste.