Liberals can insert a "Bush reading Putin's soul" joke here.
Now that that is out of some people's systems, on to the topic in question. Russia’s President Vladimir Putin has had what appears to be an extremely bizarre foreign policy. Russia has traditionally been pulled in three directions, west, east, and south. The allure of the West is the wealth and technology it possesses, but at best Russia is only one of the Great Powers (often less). The East offers Russia a world where she is not the poorest most backwards member, but the great distance and massive population of Asia limits Russia’s influence. Only when looking south is Russia unquestionably the greatest, but that’s not saying much and Russia knows it. Typical Russian foreign policy would be to bounce between areas, only focusing long enough to achieve a few goals, maintain a favorable situation and then move off in another direction. The main goal was to never become consumed entirely by one region since Russia (except during a few periods) could never hope to compete in all of them at the same time.
As such, it would be expected that Russia would continue this general foreign policy. At first it appeared as though Putin was doing just that. He would work with the West, get a few brownie points, and then do the same with China, with a few moves towards working with the Arab world against the U.S. in between. Lately though, Putin seems to be aligning Russia ever more deeply and permanently with China (here's just one example), which is somewhat confusing according to this view. There seems to be two common theories as to what Putin is doing. The first says he is just buying off China for now, until Russia can recover and be better prepared to deal with China. The second theory is that America’s foreign policy is viewed as such a threat to Russia’s position in the world that he must ally with China to limit America’s influence after which he can move away from China.
For the most part I have agreed with the first theory, though Putin seems to be moving so far into China’s camp that it seems to me that it will be nigh on impossible to escape China’s clutches in the future. Putin has set Russia on a path that is so anti-Western in general and anti-American in particular that it is difficult to see how Russia can ever come back. Here's a third theory to explain Putin's behavior, what if he never intends for Russia to come back? Again, even in the best of times Russia is only one of the Great Powers and these are no where near the best of times. Excluding nuclear weapons (which you may as well since between normal nations they play little role in geopolitics), Russia has declined precipitously since 1990. In 1990 Moscow controlled 5% of the world’s population, 11% of its GDP, and 38% of defense spending. Today Moscow has fallen to 2.2% of population, 1.8% of GDP, and somewhere between 2% and 4% of global military spending. If Russia were to try to be a part of the West, it would barely qualify as the weakest of the Great Powers and then only because of sympathy from the West. Further, Europe cannot provide Russia with any serious military support and also poses no serious military threat. The major threat facing Russia today is the Islamists to the south and the Chinese to the east. Russia barely has the power to face one of these threats much less both. Should Russia ally with Europe, there is no hope for future aid should Russia face a war to the south or east. By working with China, Russia prevents a threat from developing in the east. This would allow Russia to focus on the Muslims to the south who also pose a more serious internal threat due to Russia’s large Muslim minority. Whether China intends to allow Russia to remain an equal in the future is open to question. However, Russia may not have much of a choice. If they do not keep China friendly there is no chance of dealing with both China and the Islamists. Russia is in such bad straights this is probably their only hope. Better to serve a Chinese boss than a Muslim master.
Here is a more detailed post about Russia's foreign policy actions. Note that the arms exports to China are specifically not the kind of weapons China would need for a Siberian war. This post is a good explanation of the overall geopolitical benefits that China and Russia gain from their partnership.