Wilshere trained with Bournemouth after leaving Hammers last year.
The 29-year-old had been training with the club and has impressed manager, Jason Tindall to award him with a short-term contract.
Wilshere had a loan spell with Bournemouth during the 2016/2017 Premier League season, making 27 appearances as they finished ninth.
“It feels great to be back and I can’t wait to get started,” Wilshere told afcbTV.
“From the minute I walked through the door three weeks ago, it felt natural and like I had never been away.
Manager Jason Tindall, reacting to the deal said;
“I know a lot of the players and staff here and I’m pleased they allowed me to train initially, and then it just went from, there.
“I’ve been impressed by the coaching staff, the way they work and the ambitions of the club to get back in the Premier League.
“We all share the same ambitions and I’m looking forward to playing my part in helping achieve those.”
“He’s had his injuries for a long time now it seems. He played well in his loan spell at Bournemouth. I think he will do a good job for them as they look to return to the Premier League.
“He can still do stuff, he’s only 29, and still has a lot to offer. If he stays fit, there is a top-quality player there. Good luck to him.”
Wilshere joined West Ham from Arsenal on a three-year deal in 2018, but injuries limited him to only 19 times in all competitions.