This is a tough one for sure. I personally wouldn't want to be bitten by either if I am honest as both would not be pleasant at all but, given how bad a shark bite would be I would probably opt for the bit by a dog with rabies as long as I could get treatment afterward to prevent the infection from spreading and in the end killing me.
Well, depending on where the shark bite me, I'm sure I would survive it. But I'm so sure about a dog with rabies. I would put my luck with a shark bite.