There is an excellent diagram of the layout of the tunnels of
Shelob's Lair in Fonstad's atlas of ME which also shows its connection to the
Tower of Cirith Ungol.
After grim and grimmer this is grimmest: the stench, the darkness and unsurprisingly
Gollum sneaks off leaving
Frodo and
Sam to face
Shelob alone. "A light when other lights go out": Sam reminds Frodo of the "Lady's gift" and we find that Shelob doesn't like it, nor
Sting as Frodo advances
towards the monster bearing both. It may be that
Galadriel spoke directly to Sam to remind him.
We are told that Shelob cares only for her stomach, not
towers or rings.
Smeagol must be too scrawny for Shelob who had curried favour with her by feigning worship She found
orcs to be wary and poor
food yet now Gollum had brought her some sweeter meat. Gollum's plan is that Shelob discards
the Ring after eating the two
hobbits. Gollum with the power of the Ring would pay her back along with everyone.
Sauron regarded her as a useful guardian cat.
Their way is blocked by one of Shelob's webs which needs an elven-blade to cut through it. But Shelob had other exits from her lair and as Frodo was running to what he thought was the exit she rushed upon him. Just at that moment guess who grabs Sam: Gollum of course! There's a tremendous description of their fight and Gollum finds Sam to be a tougher nut than he thought and runs off. Then Sam turns to find out what has happened to Frodo.
I'm reminded of this: