England international Barkley will leave Bath at the end of this month, initially joining Paris-based Racing as a medical joker after injuries to two of their fly-halves and Juan Martin Hernandez's continued involvement with Argentina in the Rugby Championship.
Barkley, whose existing Bath contract was due to expire at the end of this season, is then likely to secure a longer-term deal.
"Bath Rugby is in my heart and it always will be," Barkley, 30, said.
"When I no longer play the game, this will be the club I come to watch.
"I will be forever a Bath boy, but this, for me, was simply the opportunity of a lifetime and one I just couldn't ignore.
"I will miss the club always, and I wish all of my mates here the very best. I believe they are a special group with special coaches, and I hope they achieve everything they desire.
"I would like to thank the club for their understanding, and also the Bath supporters, who have been amazing to me in my time here."
Bath head coach Gary Gold added: "Barks is a great bloke and a top player.
"I could not have been more impressed with both his attitude and his incredibly professional approach since I arrived at the club.
"As a senior player, he could not have worked harder or been more welcoming to us as a group of coaches, but every now and then an offer lands on the table that a bloke just can't refuse.
"We are sorry to see him go, but he goes with our blessing. He will always be welcome here."
Gilbert has released a new line of rugby cleats. The Gilbert Virtuo 8S is part of the exciting new product. Check it out.
The entire All Blacks apparel line has been updated for 2013/14. Check out the New Zealand All Blacks polo.
The Nike Tiempo is a solid rugby cleat and one of few styles still made from full-grain natural leather.
The Gilbert Blitz 8S rugby cleat is a great cleat at a great price of $69.99. Get a new pair of cleats today.
A cool looking all black rugby cleat with the high performance adidas is known for. Get in the Gear!
Wear the crest of the British and Irish Lions on your t-shirt. A great look for the summer.
The All Blacks Performance t-shirt is black with hints of blue from the training jersey. Very Cool.
The New Zealand All Blacks training jersey for 2013/14. Get in the Gear!
The USA Rugby Pro Alternate rugby jersey is perfect for any fan of the Eagles. Get yours to wear during the summer Test matches.
The NEW All Blacks 2013/14 jersey has arrived at World Rugby Shop. Dare to wear the colors of the All Blacks.