Environmental issues and air pollution in urban areas are driving forces behind the shift to electric vehicles (EVs). The energy storage element of the EVs can be used in many effective ways, such as increasing spinning reserve, shaving peak load, load levelling, voltage regulation etc. So, establishing a smart grid with several renewable energy sources along with the grid integration of EVs is the recent trend in power systems. One of the commonly observed essential phenomena in the smart grid including a PV system is partial shading (PS), which implicates the reduction of solar irradiation over the PV module, mainly due to leaves or branches of trees, clouds, and dust. Though most previous researchers were concerned about the steady state power reduction during PS, in this research, we focused on the reduction of transient impact on a grid-connected PV system using the controlled Vehicle to Grid (V2G) operation of the EVs. A small-scale microgrid consisting of a PV farm and a diesel generator is considered, where the PV farm experiences different degrees of shading varying from 30 to 70%. The simulation results show that due to the increase of the PS, the percentage overshoot (% OS) and settling time of rotor speed, active power and load current are increased. To mitigate this issue, we proposed the integration of plugged-in electric vehicles (PEVs), through the controlled V2G operation, which is done here by a PI controller. The proposed system improves the transient effects at both the load and generator sides. It has been found that the PS creates an oscillation in rotor speed, which is settled down by the governor system of the generator at the 20s, while the controlled V2G operation reduced this settling time to 10s. On the load side, the % OS of active power has been reduced from 4.24% to 0.44% and the settling time has been decreased from 28s to 18s by the controlled integration of the PEVs.