Even though it sounds from the words of the Shulhan 'Arukh that one may read the Shema' while walking on the way (see http://www.atorahminute.com/2017-11-20 ), nevertheless, it is appropriate to stop while reading the first verse. While one is walking, one cannot concentrate as effectively as one can while seated. However, after the fact, if one read the first verse while walking, one does not need to repeat it.
It should be noted, however, that the first verse requires intent, therefore, if one did not concentrate while reading it, one did not fulfill one's obligation and needs to repeat it. The same applies to the second verse of "Barukh Shem", which is considered like the first verse in this matter.
If one is driving, one must pull over and stop while reading the first Pasuq. If one is a passenger, one does not need to stop, since one can concentrate perfectly well while sitting in a car, plane, ship, or other mode of transportation.
(See Shulhan 'Arukh, O.H. 63:3, 4. Kaf Hahayyim, ibid., 10, 13, 14. Mishnah Berurah, ibid., 9)
Reading the Shema while walking, Shulchan Aruch, Orach Chaim, Shulhan Arukh, Orah Hayim