Create an ice bath by filling a large bowl half way with ice cubes and water. Set aside. Bring a large pot of water to a boil and add the green beans. Cook for 3-4 minutes or until crisp tender and using a pair of tongs or a slotted spoon, transfer the beans to the ice bath to shock them and to set the color. When the beans are cold, transfer to paper towels to dry them off. (If you're prepping them in advance, bundle the beans up in the paper towels and store them in a zip top bag in the fridge.)
In a large skillet, heat the olive oil over medium high heat. Add the mushrooms and cook until they've given off most of their liquid and start to brown. Transfer the mushrooms to a small bowl.
Add the pancetta to the pan and stir until it begins to crisp and becomes fragrant (3-4 minutes). Add the shallots and continue to cook until the shallots start to wilt and become translucent. Stir in the fresh thyme and add the mushrooms (but not their liquid) back to the pan and stir to combine. (If you're prepping in advance, transfer the shallot mixture to a storage container and refrigerate until you're ready to serve.
Over medium heat, add the green beans to the shallot mixture, toss to combine and cover with a lid for 2-3 minutes until completely heated through. Add a squeeze of lemon juice and salt and pepper to taste. Transfer to a serving dish.