In a medium saucepan with a tight-fitting lid, melt 2 tablespoons butter over medium heat; swirl to coat bottom of pan. Add shallots; cover. Reduce heat to medium-low; cook, stirring occasionally, until golden brown, 15 to 20 minutes. Set aside.
Meanwhile, in a large pot of boiling salted water, cook green beans until fork-tender, 4 to 6 minutes. Drain; return to pot. Toss with remaining tablespoon butter. Season with salt and pepper.
Transfer green beans to a serving dish; top with caramelized shallots.