- See OSMLib on Ubuntu for more details
osm to shapefile conversion
Firstly it should be noted that OSMLib's shapefile conversion is rather inefficient, and this is not the conversion utility used by Geofabrik to create their shapefile downloads. See Shapefile page for a list of alternative approaches.
If you want to try using OSMLib, you have to specify which kind of information you're interested in. This is done by a Rulefile in Ruby Syntax. Please make yourself familiar with the OSM Library Documentation for further details. There's also a setup section for export notes into Shapefile.