Today in class we talked about how Gollum may/may not have used Shelob for his own devices, but we only discussed it *after* Frodo's semi-treachery at the Pool. I thought I had read that, much earlier, Gollum had hatched the plan to lead them to "her" (Shelob). This was before they even reached the Gates, after the Dead Marshes (halfway down on p268):
"We wants it. But--" and here there was a long pause, as if a new thought had wakened. "Not yet, eh? Perhaps not. She might help. She might, yes."
"No, no! Not that way!" wailed Smeagol.
Could "that way" be the secret passageway that leads to Shelob's lair? Gollum/Smeagol sure is quick to offer another path once they reach the gate, and he even mentions that they would have to find another route to Sam before they realized they couldn't pass through the gates - granted smeagol/gollum muttered it under his breath. If that's true, then Gollum was planning on going against Smeagol's promise to Frodo anyway.