For wireless communication, the impact of blockage and propagation losses poses significant challenges to robust channel establishment. Reconfigurable intelligent surfaces (RISs) have been proposed as a promising technology for mitigating the coverage limitations inherent in many microwave and millimeter-wave (mmWave) wireless applications. However, wireless links facilitated by RIS are also susceptible to detrimental effects from blockages. In this communication, we present a spatial phase shift distribution (SPSD) method that alleviates adverse effects caused by blockages near RIS, exemplified for mmWave wireless scenarios. The proposed method refines the SPSD by accounting for distortions caused by blockages. This is achieved by modifying the conventional beamforming formula, which typically considers only the beam steering phase distribution between the incident wave and the desired direction. Through numerical simulations and by fabricating an RIS prototype for experimental validation, we demonstrate that the proposed method restores an average signal strength gain of approximately 3.5 dB in various scenarios, compared to traditional beamforming techniques in the presence of blockages. The proposed method can be used to optimize the transmit (TX) power of communication systems using RIS or to enhance the signal-to-noise ratio.