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 CAL-TN-0058-1-1 at:
http://xmm.esac.esa.int/external/xmm_sw_cal/calib/documentation.shtml