As a shy guy, I would probably be more likely to smile and wave goodbye...unless the girl initiated something else, like a hug.
But every guy is different. I could see how a more formal guy, who wasn't sure what to do, might end up shaking your hand instead.
The hand shake indicates uncertainty, like he didn't know if this was like a date...or if this was the first time he'd had a chance to be with you, he doesn't know what the next step is. It could even mean he's still processing everything.
It could, of course, also mean something negative, like he's not that comfortable stepping outside of the friendship territory with you, or doesn't see you that way.
But it certainly doesn't have to mean that. You have to look at other signs to see if he's telling you he's not comfortable being more than a friend, or if he likes you but he's a bit confused about how to proceed because he's shy.