Phase distribution analysis of deformed gratings in moire method and grating projection method provides accurate shape of specimen. We previously proposed the phase-shifting method using correlation with a rectangular function. The phase analysis uses many images during phase shifting of the projected grating. In this paper, we propose a new real-time phase analysis method, that is, the integrated phase- shifting method using four images of phase-shifted grating patterns with a rectangular brightness distribution. The theory and some applications to shape measurement are shown.