What is a word or phrase for "people who fake niceness temporarily to get benefits"?
To act on self- interest , is an expression that may fit in your context.
- personal advantage or interest.
- he was so nice to me just out of self-interest.
To ingraziate may suggest a behavior which aims at a personal advantage
- to establish (oneself) in the favor or good graces of others, esp. by deliberate effort: to ingratiate oneself with the boss.
The Free Dictionary