Yes, green beans – whether french beans or runner beans – can be composted.
They will break down quickly and assuming the beans inside are still immature (which they usually are), do not pose a risk of self-seeding.
In composting terms, green beans are, funnily enough, a “green” – if you’re adding them in great quantities, try to include some “browns” (such as dried leaves, cardboard or wood shavings) at the same time to keep the heap balanced.
If you have grown your own beans, you can also compost the plants at the end of the season – though as usual, don’t compost any diseased plants (in case the composting cycle doesn’t break down the virus – you don’t want to pass that on to the next generation if you can avoid it). Keep healthy plants in the ground for as long as you can before composting them too – the plants are said to “fix” nitrogen in the soil, thus improving its health for next year.
Excellent thank you