Thomas Smith says he was trying to get his life in order.

The 52-year-old thought a $9-an-hour job gathering grocery carts from the parking lot of a Wal-Mart Supercenter in East Greenbush, N.Y., was a good place to start.

He had been homeless before he landed his new job and was looking forward to bringing home a steady paycheck that he could use to support his two teenage children.

But on Nov. 6, less than 90 days into his new job, Smith was fired for redeeming a total of $5 worth of cans and bottles, violating a store policy that he claims he was unaware of, according to the Albany Times Union.

Related reading Wal-Mart back on top of Fortune Global 500

In New York, empty cans and bottles can be redeemed for cash. Smith told the paper he began collecting the ones he found discarded by customers in the parking lot to put a few extra dollars in his pocket. Wal-Mart officials maintain that the bottles were actually inside the store when they were taken.

“I didn’t know you couldn’t take empties left behind,” Smith, who has a learning disability, told the Times Union. “They were garbage. I didn’t even get a chance to explain myself. They told me to turn in my badge.”

Aaron Mullins, a Wal-Mart spokesman, told The Washington Post that Smith was fired for redeeming bottles that had been submitted to the customer service desk by other customers, making them store property. Had Smith found the bottles in the parking lot and brought them inside himself, he said, he wouldn’t have been violating store policy.

The thefts, Mullins noted, were caught on a surveillance camera.

“The reality is our former employee stole from the customer service desk, was caught on camera doing so, and signed a statement admitting to that fact,” Mullins said in a statement e-mailed to The Post. “Taking items that have been returned to the customer service desk is no different from stealing off our shelves or from customers.”

Smith told the Times Union he wanted to explain his actions, but was taken to the store’s security office and interrogated by three security managers. Afterward, he said, he was asked to sign a statement admitting his guilt.

Smith told the Times Union he was unable to read the statement without his glasses and signed the document because he wanted to avoid a larger conflict and because he didn’t want to risk violating his parole.

A copy of the statement, provided to The Post by Wal-Mart and signed by Smith, says he took bottles from the service desk and redeemed them at the register on two separate occasions.

“I Thomas Smith did not think that this was a problem because I Thomas Smith did not feel like I was stealing from the store,” the statement says.

Related reading South Australia top in recycling stakes

“C’mon,” Mark Emanatian, an organizer of the Albany chapter of the public activist group Citizen Action, told the Times Union. “Firing the guy for $2 in bottles and cans? Where’s the human compassion? Where’s the dignity and respect?”

Assemblyman Steven McLaughlin, a Republican from Schaghticoke, told the Times Union that he visited the Wal-Mart where Smith was employed and asked the manager to give him another chance by hiring him at a different location.

“I said this is nonsense,” McLaughlin told the paper. “Let’s just try to help the guy. He made a mistake, give him a warning and move on. He’s been in prison, he was homeless and now he’s got a job and is trying to contribute to society. They’re turning a mole hill into a mountain of bad publicity.”

He added: “I told Wal-Mart they’re a week away from their biggest shopping day of the year and they could end up with a bunch of protesters outside the store. Just transfer him to a different store. Easy fix.”

Smith claims he was a model employee during his brief time at Wal-Mart. When the store’s management asked him to work extra shifts on the weekend, he complied. On the day he was fired, the Times Union reported, Smith had been working four hours more than his scheduled shift.

A GoFundMe campaign created Thursday that refers to Smith as a “hard working man trying to make a living any way he can” has raised more than $8500.

“I did the right thing and stayed out of trouble,” Smith told the Times Union. “I worked hard and did a good job. I ended up getting a raw deal.”