PicoLisp, 160 157 bytes
(prin(text"She @1 @2 by the @3,\nThe shells she @1 are @2, I'm sure.\nSo if she @1 @2 on the @3,\nThen I'm sure she @1 @3 shells."'sells'seashells'seashore))
Using the template:
She 1 by the 2,
The shells she 1 are 2, I'm sure.
So if she 1 on the 3,
Then I'm sure she 1 3.
Where 1 is "sells", 2 is "seashells", and 3 is "seashore"
Common Lisp, 160 bytes
(format t"S~a~a by the ~a,~%The shells s~3:*~Aare ~a, I'm sure.~%So if s~3:*~A~a on the ~a,~%Then I'm sure s~3:*~a~*~a shells.""he sells ""seashells""seashore")