Here it's shown how to create an RBM and how it's possible to use it as a feature extractor. Hidden units' probabilities will be used as input for a simple classifier.
During the training of the RBM we can see how the ability to reproduce the original image changes epoch after epoch: