During sentencing, the judge said MacShane had committed a "flagrant breach of trust" that he had "repeated many times over a long period," the British newspaper the Guardian reported.
MacShane, 65, pleaded guilty last month to filing 19 bogus receipts for "research and translation" services.
He also was ordered to pay $2,500 in costs within two months.
MacShane is the fifth former member of Parliament to be sentenced in connection with a 2009 expenses scandal. He resigned from Parliament in 2012.
The judge stipulated MacShane should serve half his sentence and be released early. He said MacShane had suffered a "long period of public humiliation" and had not committed the crimes "out of greed or for personal profit."
The judge also noted the money had been paid back.