President Barack Obama came under fire on Friday for his visit to a Walmart in California.

Labor unions and advocacy groups slammed the president for praising Walmart for energy efficiency while failing to address the big box retailer’s low wages and meager benefits.

Obama’s visit “sends a terrible message to workers across America,” said Joe Hansen, international president of the United Food and Commercial Workers International Union, in a statement.

“He is lending credibility to a bad actor when he should be joining the calls for Walmart to change,” Hansen said. “A federal agency—the National Labor Relations Board—is prosecuting Walmart for retaliating against workers who stand up and speak out. Taxpayers are subsidizing Walmart which pays many of its own workers so little that they must rely on food stamps and Medicaid.”

Hansen urged the president to meet with Walmart workers after Friday’s event so they “can tell him firsthand about their struggles.”

Thirty two groups including Global Exchange, Jobs with Justice, Moveon.org, and Rainforest Action Network issued a joint statement to protest the president’s visit as workers and their supporters rallied at the store in Mountain View, Calif.

Among those at the rally was an employee of the store, Pam Ramos, who published an op-ed in Salon this week about her “nightmare” working for Walmart. She said she wished the president would listen to her and other workers who can’t make ends meet because Walmart pays them so little.

Ramos said she can’t pay rent and medical bills on her $400 a week salary and is now homeless.

“I want the president to help us and tell Wal-Mart to pay us enough to cover the bills and take care of our families,” Ramos wrote. “That doesn’t seem like too much to ask from such a profitable company, a company that sets the standard for jobs in this country. And I hope it’s not too much to ask from a president who believes that income inequality is the defining challenge of our time.”

In his speech at the Walmart Friday, Obama commended the store for installing solar panels, swapping traditional light bulbs for LEDs, improving the efficiency of refrigerator units and adding a charging station for electric cars.

“All told, those upgrades created dozens of construction jobs and helped this store save money on its energy bills,” Obama said. “And that’s why I’m here today -- because more and more companies like Walmart are realizing that wasting less energy isn’t just good for the planet, it’s good for business. It’s good for the bottom line.”

Obama’s has become cozier with Walmart since becoming president. Last year, he touted the company for hiring veterans, and in 2011 First Lady Michelle Obama worked with Walmart to sell healthier foods as part of her Let’s Move campaign.

But when Obama was a senator in 2007, he told an AFL-CIO town hall forum that he wouldn’t shop there, according to the Chicago Sun-Times.

“As profitable as they are, there's no reason they can't afford to pay” higher wages, Obama said at the time.

About 200 people attended Obama’s speech on Friday, including Walmart employees.

The president praised Walmart for having the most installed on-site solar capacity of any company in America, and for the retailer’s plans to double that capacity, an effort he said could save $1 billion a year.

He did not mention his administration’s campaign to raise the minimum wage, a policy item he promoted heavily just last week.

A White House spokesman was dismissive when asked whether the president’s promotion of Walmart for its energy efforts clashed with his pay equity message.

“I didn’t hear anything of a mixed message today,” said the spokesman, Eric Schultz. “Climate change is real and it’s affecting every region of the country. The president's commitment to raising the minimum wage is well known and we've led by example, and we want Congress to finish the job."

He wouldn’t say if Obama had talked to any Walmart executives about minimum wage.