If it is just a matter of connecting the porch roof to the main roof I
would use 20" galvanized valley flashing under the last row of
shingles on the main roof, and extending it over the top row of
shingles on the porch roof. Leave about 3" extended from the two
sides of the porch roof.
You can put some roofing caulk, like Sonneborn NP1, on the porch
shingles where they will be covered by the valley flashing--but don't
try to use caulk or tar to waterproof the area--that's a mistake.
Also, where the structural member of the porch connects to the main
roof at each side, I would install tin shingles, or a fabricated piece
of flashing, to divert the water around that area.