A boy is being taken to hospital after he was bitten by a shark in shallow waters north of Mandurah.