The controller rendermethod is different from viewing. You want to execute it in the context of the view:
@test = view_context.render 'spree/shared/footer'
render_to_string , html_safe, html- <% = @test% > .
UPDATE:
. "content_for". , . , , :
# Your application layout
<html>
<head>
...
</head>
<body>
yield :image
<div id="wrapper">
yield
</div>
</body>
</html>
, yield :image
<% content_for :image do %>
<%
<% end %>