U need to seal the wood, and line the garden part with a plastic barrier to keep the moisture away from the wood... I have pallets that have been stacked out back for years.. Sure the bottom ones are punky, but anything that not it direct contact with the earth is fine.. One of my hobbies is wood working, and right now id say 90% of the things I make are from old pallets.. The rustic look sells, and can be made quickly as your not aiming for perfection.. If your looking to make your gardens out of pallet wood for the look, I would simply make the gardens out of some rot resistant lumber like cedar, or soak some pine in sap/pitch, then simply skin the outside with pallets and replace when they rot.. As long as the boards stay of the ground, they will weather, but should last a few seasons... I make ADK chairs out of pallets, and those damn things have lasted years.. I did treat them with some thompsons water sealer, as they are not going near plants/crops so using a chemical sealant didnt phase me but I have a few that I left untreated just to see how long they last, and other than getting weathered faster, they are still solid 2 years later..