To look over the shoulder(s) of a person with whom you are currently engaged in conversation to see if you can find someone 'better' to talk to.

Connotes a lack of interest in the current interlocutor and/or in what they are currently saying, and displays a desire to, if possible, upgrade to 'someone better' (e.g. of higher social status, better looks, etc.).

While engaged in a conversation with a person at a party, you could be accused of (or at least suspected to be) "shoulder surfing" if you look over his/her shoulder(s) to check out who else is in attendance.