It is very easy to get to Trunk Bay from St Thomas using public transport (or taxis) instead of paying for a ship's excursion.
To get to Trunk Bay you need to go from the cruise ship dock to Red Hook and take the ferry to St John. The ferrys run every hour (sometimes they run more often, but it depends on the day and the season. (see the ferry schedule Here
To get to Red Hook requires taking the public "bus" or a private taxi. Both can be found by walking to the end of the dock area. There will be many taxi drivers that will try to get you to get in their taxi. They will probably charge you in the range of $20 or may ask for a per person fee. Your other option is to go outside the dock area and cross the street (you can ask someone - do not ask taxi driver -where the bus stop is) There is a local bus stop if you take a left from the havensight entrance and walk down about a block just past the Wendy's store. This is where the return bus will drop you off, but it goes the wrong way to get to Red Hook (it eventually gets there but goes way out in the country first). To get to the bus going towards Red Hook, cross the street (you will see a Pubelo grocery store there) and walk North (away from the ship area) in front of Pubelo. About 2 blocks up you will see a Payless shoe store, the traffic light intersection is where the bus going to Red Hook will stop. (You need to cross to the far side of the street because the bus will be heading east) Everyone we talked to was very friendly and very helpful, so you can just ask a local were the bus stops going towards red hook and they should be able to direct you. The local bus looks a lot like the taxis, but is a lot older. Its best to verify that its the bus and not a taxi before you get on. Typically it is a green truck with row seating in the back (covered) They charge $2 per person to take you to Red Hook. When a bus comes by, flag it down and when it stops ask the driver if his route goes to Red Hook to verify... Its probably 20 minutes to get there once you are on the bus but you could wait a while for the bus. But they seem to come by often. If you are in a hurry the taxi is more expensive, but you can go as soon as you get to the taxis.
Once at the ferry station, you need to buy tickets and then get on the ferry. If you are lucky you won't have to wait long. The trip to St John's is about 15 minutes and the ferry leaves on the hour. On St John, go outside of the ferry dock and you'll take another taxi to Trunk Bay. You can also ask to go to Cinnamon Bay if you like. There is a constant flow of taxis to and from the bay so you can pretty much leave whenever you like. Just do the same trip in reverse to get back. (watch your time so that you catch a ferry on the way back or you will sit there for an hour.) Our return bus trip went the long way around to get back to the ship so they charged us $2 each for the return. You could also just grab a taxi back. So total travel time assuming you are lucky and catch the ferry's, could be as short as 1 to 1.5 hours, so if you assume you have to wait, I'd throw another hour in there. So if you stay at the bay 2 to 3 hours and you get off the ship by 8:30AM you could be back by 2 to 2:30 to shop or do something else.
You may be asking if its cheaper to do it this way. The answer is yes. Especially if you can take the bus on at least one leg of the trip. I took my family of four for about half of what the ships tour would have cost and we took a taxi on one leg of the trip to Red Hook. This last time we took the bus both ways and went to cinnamon bay where they did not charge us an entrance fee. For 4 people, it was $16 in bus fares, $40 in ferry tix ($5 pp per trip), and $36 taxi fees on St John. So total was $92 for four people and we had 3.5 hours on St John versus 1 or 2 hours for a ship's tour. I think the ship's tour was $89 a person.
There is a charge to get into Trunk Bay (US Parks) of $4 per adult. Under 16 years is free.