Our teacher, the Rema, wrote regarding this: "And specifically if he can return it without exertion, but if it requires exertion for this—it is forbidden, for we fear perhaps he will tie it" Thus far his words. That is to say, the returning itself has no prohibition in it, since the straps were inside it, but rather that when the returning involves exertion—we fear that he will have pity on his exertion and tie them at their ends, so that they do not slip out another time and he would need to exert himself. And the commentators of the Shulchan Aruch took issue with him, for the Tosafot and the Rosh at the beginning of the fourth chapter wrote explicitly that in a place where there is a concern of tying, even in a wide hole where there is no exertion—it is forbidden, and in a place where the hole is narrow and there is exertion—it is forbidden due to exertion even without a concern of tying (Taz subsection 4 and Magen Avraham subsection 9 and Eliyah Rabbah and Tosefet Shabbat). And I say that there is no contradiction from there, for the Tosafot and the Rosh wrote regarding a cloak which is an outer garment and large in its size, and therefore when there is exertion it is certainly not proper to exert oneself so much on Shabbat, which is not the case with shoes which are small in size. And that which they wrote that when there is a concern of tying it is forbidden even in a wide hole where there is no exertion, this is in a place where it is their way to tie, as is clear from their wording where they wrote: 'For in a manner that it is common to insert and tie etc.' Thus far his words, that is to say that such is the way of the world, and our teacher, the Rema, was not dealing with such cases. And in the Hagahot Mordechai chapter 4, I found explicitly like his words, and this is his wording: "Our teacher Shmuel bar Natronai ruled that the straps of a jacket that slipped out—it is permitted to return them on Shabbat, and so ruled the Geonim… provided that it be in that manner where we do not need to fear perhaps he will insert it [tightly], such as when the hole is large, that he can return it without exertion" Thus far his words; behold, it is explicitly like the words of our teacher, the Rema. And even if we say that they argue with the Tosafot and the Rosh, since this is regarding a rabbinic matter we follow the lenient view, and so it appears in my humble opinion to be the primary view.
וכתב על זה רבינו הרמ"א: "ודוקא שיכול להחזירו בלא טורח, אבל אם צריך טורח לזה – אסור, דחיישינן שמא יקשור" עכ"ל. כלומר דהחזרה בעצמה אין בה איסור, כיון שהיו הרצועות בתוכו, אלא דכשהחזרה היא בטירחא - חיישינן שיחוס על טרחתו ויקשרם בראשיהם, למען שלא ישמטו פעם אחרת ויצטרך להטריח. ומפרשי הש"ע השיגו עליו, דהתוספות והרא"ש ריש פרק ד' כתבו מפורש דבמקום שיש חשש קשירה, אפילו בנקב רחב שאין טורח – אסור, ובמקום שהנקב צר ויש טירחא - אסור משום טירחא גם בלא חשש קשירה (ט"ז סק"ד ומג"א סק"ט וא"ר ות"ש). ואני אומר דאין סתירה משם, דהתוספות והרא"ש כתבו על סרבל שהוא בגד עליון וגדול בכמותו, ולכן כשיש טורח ודאי אינו נכון להטריח כל כך בשבת, מה שאין כן במנעלים שהם קטני הכמות. וזה שכתבו דכשיש חשש קשירה אסור אפילו בנקב רחב שאין טירחא, זהו במקום שדרכן לקשור, כמבואר מלשונם שכתבו: 'דבענין שהוא רגילות לתקוע ולקשור וכו' עכ"ל, כלומר שכן דרך העולם, ורבינו הרמ"א לא מיירי בכהני גווני. ובהגהות מרדכי פרק ד' מצאתי מפורש כדבריו, וזה לשונו: "פסק רבינו שמואל בר נטרונאי דרצועות מקטורן שנשמטו - מותר להחזירן בשבת, וכן פסקו הגאונים… ובלבד שיהא שם באותו ענין שלא נצטרך לחוש שמא יתקע, כגון שהנקב גדול, שיכול להחזיר בלי טורח" עכ"ל, הרי להדיא כדברי רבינו הרמ"א. ואפילו אם נאמר דפליגי על התוספות והרא"ש, כיון דזהו בדרבנן הולכין להקל, וכן נראה לעניות דעתי עיקר.