One of the main challenges in distributed generation is to keep supplying some priority loads when islanding occurs. Unfortunately, most anti-islanding protection (AIP) methods fail in islanding detection if the demand in the islanded loads matches the production in the island. Many active AIP schemes are too slow and cause power quality problems. In this paper, an islanding detection method for inverter-based photovoltaic system (PVS) is presented, operating with a simple adaptive loads shedding algorithm. This method is based on modulating the inverter output voltage at the point of common coupling. This frequency modulation consists in introducing interharmonics as side bands of the inverter voltage. After islanding detection, the adaptive loads shedding algorithm operates so as to keep powered priority loads as possible. AIP scheme and PVSs are implemented in MATLAB/Simulink environment. The effectiveness of the proposed scheme was tested and evaluated under a wide range of operating conditions. These tests determined that the proposed technique does not exhibit any non-detection zone and detects islanding within five electric cycles. No significant effect on power quality is recorded even during islanding detection time. The proposed technique was also robust and more independent of system parameters than some others.