Once, while a customer was reaching for an item off the belt, I shook their hand.
What was your place of employment?
I work at a grocery store
You should give customers their space. Most customers don't like being intruded upon while shopping.
It's fine, we only talked for like a couple of seconds, didn't even disrupt their whole shopping trip.
It might have only been a few seconds, but it's wrong to invade the personal space of other people. I wouldn't be surprised if you made the customer feel quite awkward after you did this. I'd suggest keeping to yourself in the future.