The article studies a metamaterial placed in the aperture of a rectangular waveguide with dimensions of 36x18.1 mm to change the phase of the transmitted wave depending on the switched pin diodes. Since pin diodes are switched by supplying a constant voltage to them in the metamaterial structure, capacitors with a capacitance of 35 nF were installed, which make it possible to achieve separation of the constant component of the switching voltage from the alternating one, and, accordingly, ensure switching only in the required nodes. The simulation results contain S-parameters of the system, which prove the possibility of using the proposed metamaterial as a waveguide phase shifter.