If you do not like exploits then you might not want to read this guide. Other then that its probably not a glitch so.
It is very quick to do, and depending on RNG will get you very rich indeed somewhere around 200-300 gold. At no cost! This is a lot for just starting out.
How to Do It
After the witch knocks everybody out, simply kill them. Don`t worry! After the boat crashes all you need to do is walk down a bit and see the red prince standing there and you will see that everybody does not stay dead.
However you do get a very large amount of fairly valuable loot!
Bonus! (Not Exploit)
Look out for golden cups, they are worth a lot of gold, so far i have found 2 of em on the ship.