The Russian word шапка “hat” is ultimately derived from Latin cappa “head-covering” according to Vasmer. The likely route is via Old French and Middle High German. Čapka (Czech) and czapka (Polish) begin with a “tch” sound because in Old French, “ch” was pronounced much as it is in modern English, as “tch.”
In Turkish, şapka – approximately homophonic with the Russian word, except for the stress – also means “hat.” Vasmer’s sources suggest the Turkish word is a Slavic loan.
However, the only Turkish etymological dictionary I have found online, by Sevan Nişanyan, derives şapka from Arabic şabaka(t) “fish net or net of any kind” or “headgear,” similar to Aramaic şibkā. Modern Hebrew has סְבָכָה and biblical Hebrew had שְׂבָכָה (sabakah in both cases) for “lattice, network.”