Law 12:
A direct free kick is awarded to the opposing team if a player commits any of the following seven offences in a manner considered by the referee to be careless, reckless or using excessive force:
- kicks or attempts to kick an opponent
- trips or attempts to trip an opponent
- jumps at an opponent
- charges an opponent
- strikes or attempts to strike an opponent
- pushes an opponent
- tackles an opponent
Even it isn't technically a tackle, it's a trip.
The defender has let his marker get on the wrong side of him. As such he plants his foot in the swinging arc of the shot. Clips the leg, causing the attacker to fall over.
If he was a better defender, he'd goal side and blocking the shot.
No question in my mind that it's a foul.