Unfortunately their is no easy way to extract the contents of an rpm using the rpm command itself. Luckily the utility rpm2pio can perform this magic for you. This is especially handy when a package has had a specific file that it relies on removed and a reinstall will not complete or is not feasible. If someone ran an rm -rf /* you may be able to repair the system or at least get it limping along enough to get your data off before reloading it.
First you use rpm2cpio to convert the .rpm file into a cpio archive on standard out. If a - argument is given, an rpm stream is read from standard in. The basic syntax is as follows rpm2cpio /path/to/downloaded.rpm | cpio -idmv
[callisto] (~/test) >>> rpm2cpio php-fpm-5.3.3-27.el6_5.x86_64.rpm | cpio -idmv
./etc/logrotate.d/php-fpm
./etc/php-fpm.conf
./etc/php-fpm.d
./etc/php-fpm.d/www.conf
./etc/rc.d/init.d/php-fpm
./etc/sysconfig/php-fpm
./usr/sbin/php-fpm
./usr/share/doc/php-fpm-5.3.3
./usr/share/doc/php-fpm-5.3.3/LICENSE
./usr/share/doc/php-fpm-5.3.3/php-fpm.conf.default
./usr/share/fpm/status.html
./usr/share/man/man8/php-fpm.8.gz
./var/log/php-fpm
./var/run/php-fpm
6573 blocks
In the above example the flags suuplied to the cpio command are as follows:
i: Restore archive
d: Create leading directories where needed
m: Retain previous file modification times when creating files
v: Verbose i.e. display progress
While rpm2cpio is not likely a command you will use often, it is a lifesaver when attempting to rescue a broken system.