Magic‎ > ‎Spells (Paizo)‎ > ‎R‎ > ‎

Rope Trick

School transmutation; Level sorcerer/wizard 2

CASTING

Casting Time 1 standard action
Components V, S, M (powdered corn and a twisted loop of parchment)

EFFECT

Range touch
Target one touched piece of rope from 5 ft. to 30 ft. long
Duration 1 hour/level (D)
Saving Throw none; Spell Resistance no

By the way...
The entrance to the extradimensional space created by this spell does not move with a ship.

Source Skull & Shackles Player's Guide