(update on 25 Aug 2014: it is reported that passport holders of Philippines and USA are not given Shenzhen Visa at the border.)
If you plan to go to Shenzhen from Hong Kong, just get a Shenzhen visa at Lowu or Huanggang border. No need to apply for a China visa in advance. But this is the case only if you are a passport holder of certain countries, such as most of the EU countries, Canada, Australia and New Zealand. US citizens are not eligible for this Shenzhen visa, so are passport holders of the following countries: Afghanistan, Algeria, Bahrain, Cameroon, Egypt, India, Iran, Iraq, Jordan, Kuwait, Israel, Lebanon, Liberia, Libya, Nigeria, Oman, Pakistan, Palestine, Qatar, Saudi Arabia, Somalia, Sri Lanka, Syria, Sudan, Turkey, Uganda, United Arab Emirates and Yemen.
The Shenzhen Visa Office at Lowu is immediately upstairs after clearing the Hong Kong immigration and customs. It is open 9AM-10:30PM seven days a week and accepts RMB for payment only. The visa is a five-day visa and costs RMB160. If you are a UK passport holder, you will be charged a much higher fee at about RMB470.
A friend has just got a Shenzhen visa for RMB160 at Lowu border. According to him, the whole process took about half an hour. You will first get your queue number, and when it is your turn, you give your passport to the staff for checking, followed by making payment at another counter. You will then have to wait again for your turn to collect your passport, this time with the visa.
It was a Sunday when my friend applied for the Shenzhen visa, and the visa office, he said, was surprisingly not crowded with foreign travelers, but with Filipino domestic helpers working in Hong Kong and hoping to spend their only free day in a week in Shenzhen.
Note that the Lok Ma Chau border (the one connected by MTR) has no Shenzhen visa service. You can only apply for a Shenzhen visa at Lowu border or Huanggang border.