(Goblin Temple isn't a spell.)
Goblin Temple enters the battlefield tapped.
,
: Tap target artifact with converted mana cost X or less.
, Pay 1 life, Sacrifice Goblin Temple: Search your library for a Mountain or Plains card and put it onto the battlefield, then shuffle your library.