On the contrary.
She dressed the part, and went to the crossroads seeking to concieve a child. She was willing to go to that length (though Judah had a responsibility to provide her with an heir) and she took payment.
In Genesis 38:26 Judah says that Tamar is more righteous than he, not that what she did was righteous.
Broken people all around.
As am I.
To my mind that was her pretending to be a prostitute. She did not accept payment, she took a pledge in lieu of payment, which she never received.