Teresa Giudice thinks Sofia Vergara acted like a “bitch” during a photo-op, which is totally out of line because — according to Teresa — Sofia’s an immigrant and oughta act nice.

The ‘RHONJ’ star spilled the beans last week during a panel discussion — “Gettin Real With The Housewives” — where the audience asked about her best and worst celeb encounters. Teresa tore Sofia apart.

Here’s what happened, according to Teresa. She and Sofia took a pic last week together while at a media event and Sofia supposedly stepped in front of her to steal the spotlight. Then she griped about posing with Teresa.

Teresa straight-up calls Sofia a bitch. She then gets xenophobic … saying immigrants should be good-natured.

On a positive note … at least Jennifer Lopez is all good in Teresa’s book.