These four words all could be relevant to directions or locations when function as prepositions, the particle zhe (着) often collocates with these prepositions to form disyllabic words.
The use of zhào(照) indicates that an action is performed towards a reference point or direction.
(1)他照着靶子打了一枪。
tā zhào zhe bǎ zi dǎ le yī qiāng.
He fired a shot towards the target.
(2)你照着这个方向走就对了。
nǐ zhào zhe zhè ge fāng xiàng zǒu jiù duì le.
You just have to walk towards this direction.
Yán zhe(沿着) and shùn zhe (顺着) are used to introduce the direction in which an action passes or the route that somebody or something moves along.
(3)你顺着/沿着这条路一直往东走就能看到那片森林了。
nǐ shùn zhe /yán zhe zhè tiáo lù yī zhí wǎng dōng zǒu jiù néng kàn dào nà piàn sēn lín le.
You can see the forest if you walk along this road to the east.
As a proposition, yán(沿) also could collocate with a monosyllabic noun, indicating a location.
(4)沿路有不少商店。
yán lù yǒu bú shǎo shāng diàn.
There are many shops along the road.
However, when it refer to trails that are not passable, only shùn zhe (顺着) can be used, since shùn zhe (顺着) can introduce the route along which things naturally move.
(5)汗水顺着/*沿着她的脸颊不断地往下流。
hàn shuǐ shùn zhe /*yán zhe tā de liǎn jiá bú duàn de wǎng xià liú.
Sweat flowed down her cheeks continuously.
The use of yán zhe(沿着) can introduce a path or a direction in an abstract sense, but shùn zhe (顺着) can’t. In this case, àn(按)/ àn zhe (按着) and zhào(照)/ zhào zhe (照着) can replace yán zhe (沿着), but the meaning is slightly different, àn(按) and zhào(照) mean to follow some certain criteria when serving as prepositions, which translate to “according to” in English.
(6)教授建议我们沿着/按(着)/照(着)这个新的思路展开研究。
jiāo shòu jiàn yì wǒ men yán zhe /àn (zhe)/ zhào (zhe) zhè gè xīn de sī lù zhǎn kāi yán jiū.
The professor suggested that we launch the research along/according to this new line of thinking.
Reference: 傅鸿础. 汉语常用近义词语辨析, 汉英双解[M]. 北京大学出版社, 2010.