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 Barbarians are one of the top invitational rugby sides with a long history and classic rugby jersey.
The Nike Tiempo is a solid rugby cleat and one of few styles still made from full-grain natural leather.
The Lions get ready for their matches with this green training jersey. It's what the players wear. Get in the Gear!
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.
$29.99
The Lions are ready to get their Australia tour underway. They arrive in Perth on Monday.
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.