PicoLisp, 160 157 146 142 142138 bytes
(prin(text"S@1 @2 by the @3,
The shells@5 s@1 are @2,@4.
So if s@1 @2 on the @3,
Then@4 s@1 @3 shells@5.""he sells"'seashells'seashore" I'm sure"]sure"'shells]
Using the template:
S1 by the 2,
The shells5 s1 are 2,4.
So if s1 on the 3,
Then4 s1 3 5.
Where 1 is "he sells"
, 2 is "seashells"
, 3 is "seashore"
, and 4 is " I'm sure"
{ 14 imaginary interweb points for guessing which syntax highlighting I'm using without peeking }
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")