What if I walk by or brush against a contactless terminal? Could I accidentally pay for someone else's shopping?

No. First of all, the card needs to be very close to the terminal (always less than ten centimetres and usually less than two centimetres) - so generally a touch of the card above the terminal is required to make the payment.

Also, in a typical transaction, the sales assistant has to enter the amount for you to approve first, and then your card has to be held within a couple of centimetres of the terminal for longer than half a second.