The task rgsbkgmodel can be used to compute a model spectrum of the RGS background applicable to a given observation from a combination of observations of empty fields.
For a detailed description of this task see the technical note XMM-SOC-CAL-TN-0058 at:
http://www.cosmos.esa.int/web/xmm-newton/calibration-documentation