What's the word for someone who acts sanctimoniously, especially under a pretence to improve their reputation?
You can use Prig. Its meaning in the OED is
A self-righteously moralistic person who behaves as if they are superior to others.
The word I think you may be looking for is Social Justice Warrior, although this is used only sanctimoniously for left wing causes. It's the noun for those that virtue signal, in my estimation. From Urban Dictionary
social justice warrior
A pejorative term for an individual who repeatedly and vehemently engages in arguments on social justice on the Internet, often in a shallow or not well-thought-out way, for the purpose of raising their own personal reputation. A social justice warrior, or SJW, does not necessarily strongly believe all that they say, or even care about the groups they are fighting on behalf of. They typically repeat points from whoever is the most popular blogger or commenter of the moment, hoping that they will "get SJ points" and become popular in return. They are very sure to adopt stances that are "correct" in their social circle.
The SJW's favorite activity of all is to dogpile. Their favorite websites to frequent are Livejournal and Tumblr. They do not have relevant favorite real-world places, because SJWs are primarily civil rights activists only online.
Wikipedia has a similar interpretation:
"Social justice warrior" (commonly abbreviated SJW) is a pejorative term for an individual promoting socially progressive views, including feminism, civil rights, multiculturalism, and identity politics. The accusation of being an SJW carries implications of pursuing personal validation rather than any deep-seated conviction, and being engaged in disingenuous social justice arguments or activism to raise personal reputation, also known as virtue signalling
The phrase originated in the late 20th century as a neutral or positive term for people engaged in social justice activism. In 2011, when the term first appeared on Twitter, it changed from a primarily positive term to an overwhelmingly negative one. During the Gamergate controversy, the negative connotation gained increased use, and was particularly aimed at those espousing views adhering to social liberalism, cultural inclusiveness, or feminism, as well as views deemed to be politically correct.
The term has entered popular culture, including a parody role-playing video game released in 2014 titled Social Justice Warriors.