 It was clear to the writers from the very beginning that the entire  final sequence of the novel (Frodo and Sams encounter with Shelob)  would be part of the third film, not this one. This tactical move  meant the battle for Helms Deep became this films natural climax.