3D morphable model (3DMM) is a powerful tool to recover 3D shape and texture from a single facial image. Its foundation consists of three models (i.e. face, camera, and illumination) which can simulate the formulation process of facial images. In this paper, we adopt a new illumination model, the Sphere Harmonic Illumination Model (SHIM), to the 3DMM fitting process. The new illumination model takes more lighting factors into consideration than the Phong's model. Then, we use a new optimization algorithm to optimize the shape and texture parameters simultaneously under SHIM. Compared with the the existing methods that used SHIM to recover only texture, both the shape and texture recovered by our algorithm are improved. The experiments on he CMU-PIE database also show that, compared to other state-of-the-art methods based on the Phong's model, the proposed approach enhances the robustness of the fitting of 3DMM against lighting variations.