A woman attacked by a shark about 200 kilometres off the coast of Queensland had to be rescued by a navy ship and transported back to land.