Fry the shallots. Put the sliced shallots and the oil in a medium saucepan over medium heat. Cook, stirring often, for 15 to 20 minutes, until they turn light golden. Lift them out onto paper towels and salt them right away, since they crisp as they cool.
Fry the onions. Bring the same oil up to 350 degrees F. Toss the onion rings in the flour with a pinch of salt, shake off the excess and fry them in batches for 2 to 3 minutes, until golden and crisp. Drain and salt them too.
Build the base. Melt the butter in a large, deep skillet or Dutch oven over medium heat. Add the diced onion and cook 4 to 5 minutes, until soft, then stir in the garlic for 30 seconds.
Simmer until tender. Add the green beans and toss to coat. Pour in the stock, cover and simmer 20 to 25 minutes, stirring once or twice, until the beans are soft all the way through.
Make it creamy. Uncover, then stir in the cream, salt, pepper and smoked paprika. Simmer 8 to 10 minutes, until the sauce thickens and coats the beans.
Finish and serve. Stir in the lemon zest and juice, then taste and adjust the salt. Transfer to a serving dish, pile the crispy shallots and onions over the top and finish with a little more lemon zest.