In a saute pan with straight sides or a medium pot, add the olive oil and raise the heat to medium-high. Add the onions and season with a pinch of salt and grind or 2 of pepper. Cook the onions, stirring and moving around, until tender and translucent, about 4 minutes. Add the garlic and lower the heat. Continue cooking until fragrant and tender, about 2 minutes. Add the string beans and season with salt and pepper. Stir to coat, and then add the chicken stock. Raise the heat to a simmer and cover. Cook until the green beans are very tender, about 25 minutes. Spritz with lemon just before serving.