You need to check the recycling symbol on the bottles - that should look like a sort of triangle with a number in the middle. If the number is 1, 3, 6 or 7, you should not grow food plants in them, see here https://themicrogardener.com/choose-safe-containers-for-growing-food/
As for something permanent that gives fruit every year, that would be a fruiting perennial, like an apple tree or a blueberry bush. Clearly, either of these will outgrow the container fairly quickly; the material of the bottle will also degrade quite rapidly outdoors in sunlight/cold temperatures, so I don't think you can plan on planting something in one of the containers and still have it fruit and grow for, say, 3-5 years.
If the plastic the bottles are made of is not one of the numbers mentioned above, you'd need to put drainage holes in the bottom; you could use them to grow annual vegetable or fruit plants, such as tomatoes, but that would mean replacing them every spring. Alternatively, you could plant some hardy herbs like chives - not precisely a food plant, but useable for culinary purposes, though you will still need to replace the containers every 2 or 3 years as they degrade, possibly sooner.
In regard to your comment re 'access to soil', garden soil should not be used in containers, it should be new, sterile potting medium.