Keep rig feet flat on the ground (IK Rig)
One simple solution is to select the foot bones and uncheck the "Inherit Rotation" option.



Another interesting foot behaviour can be achieved parenting the Foot bone to the LegIK bone instead of Shin (and leaving the "Inherit Rotation" Checked).

Anyway the foot rigging is one of the most complex situation in human rigging; so, to improve your leg, you can type "How to rig a leg" on Google and find tutorials like this https://www.youtube.com/watch?v=0U3NjTvwdWI.