Measuring phase shift between current and voltage with microcontroller
From my understand there should be a PWM signal generated on the output. 


Yes, the pulse width being the difference in phase.


  Resistors R3 and R4 are there to drop the 12 V output of the OP amp to 5 V. 


Correct.


  Resistor R2 is limiting the current through the diodes D1 and D2. 


Correct.


  However, I do not understand how the voltage drop on R1 and R5 is phase shifted by the same phase as the current and voltage of the source V1. Can someone please explain that?


It isn't. The schematic is not correct. One of the transformers should be monitoring the supply voltage so it should be directly across the supply. The other transformer should be monitoring the supply or load current so it should be in series with the load - and there is no load in the schematic!

Once the transformer problems are addressed the rest should work.

Safety: remove the primary-secondary link at the bottom of XFMR2.









simulate this circuit &ndash; Schematic created using CircuitLab

Figure 1. Modified schematic showing load connection point.

Note that the load current goes through the CT - usually one or a few turns. I've shown the current path in thicker lines.