You need to blanch them first,
In a blanching pot or large pot with a tight fitting lid, bring 5 quarts of water to a rolling boil.
Meanwhile, wash beans, trim stem ends and cut into1-inch pieces or leave whole.
Blanch no more than one pound at a time. Add beans to boiling water and immediately cover with a tight fitting lid.
Start timing immediately and blanch for four minutes.
Prepare an ice water bath in a large 5-quart container or the sink.
Remove beans from water with slotted a spoon or blanching basket.
Emerge in the ice water bath for five minutes or until cooled. If you do not have ice, use several changes of cold water or running cold water. Remove and drain.
Pack cold beans in zip-closure freezer bags or freezer containers. Squeeze out as much air as possible before sealing bags.
Label and date each container or bag. Immediately place in the freezer, allowing an inch of space around each container until it is frozen. Freeze for up to one year at 0 degrees F. or below.
Blanching water can be used over and over again. Add more water if necessary. Remember to always bring water back to a rolling boil before blanching more vegetables.
Hope this helps.