i havent tried this but i think this would be work.
first of all add all openlayers file in site / libs / openlayers as to getting dependencies.
then make a js file with name qgis-modifications and add this to your main file...
write the following code in your qgis-modifications.js. this should work...
and consider this for adding google maps to your project. more info here...
<script src="http://maps.google.com/maps/api/js?v=3.2&sensor=false"></script>
Codes:
var gphy = new OpenLayers.Layer.Google(
"Google Physical",
{type: G_PHYSICAL_MAP}
);
var gmap = new OpenLayers.Layer.Google(
"Google Streets", // the default
{numZoomLevels: 20}
);
var ghyb = new OpenLayers.Layer.Google(
"Google Hybrid",
{type: G_HYBRID_MAP, numZoomLevels: 20}
);
var gsat = new OpenLayers.Layer.Google(
"Google Satellite",
{type: G_SATELLITE_MAP, numZoomLevels: 22}
);
geoExtMap.map.addLayers([gphy, gmap, ghyb, gsat]);
i hope it helps you...