Abstract-In distribution systems, shunt capacitors are added in order to reduce the total active power loss and improve the power factor. However, the installation of shunt capacitors in distorted distribution systems will amplify the harmonics distortion level, if it is not placed in a proper location with harmonics consideration. Therefore, to take into account the presence of harmonic distortion, this paper proposes a simplified direct search algorithm to determine capacitors placement and sizing in distorted distribution systems. This algorithm is connected to harmonic power flow to search the proper location and size of shunt capacitors, which can decrease the total active power loss and increase the power factor, while the total harmonic distortion does not exceed the maximum allowable harmonic distortion level at each bus. To validate the method proposed, this algorithm is tested on 13-bus radial distribution system and 34-bus radial distribution system with harmonic current injection in order of 5, 7, 11, 13, and 17.