Is a smoked pork shoulder a suitable substitute for ham hocks?
Ham hocks are used to add a variety of properties to beans as well as other vegetable dishes like greens and stews.  Ham hocks predominantly add smoky flavor and salt. In dishes where the ham is cooked for a prolonged period with water you also get an improved mouth-feel from gelatin that dissolves into the stew.  Aged hams also add the distinct flavors that accumulate from the curing salts and the aging process.

Using a smoked shoulder will provide the smoky flavor as well as some gelatin (provided you use a prolonged cooking method) but you may need to increase the amount of salt you use and you will be missing some of the "ham-y" flavor that you get from using a real aged ham hock.

Other options include bacon (especially dry-cured), ham base, or bouillon.  I have gotten a few free prosciutto hocks from the local deli (they were just going to throw it away) that added great ham flavor but no smokiness.