This will be because @shop is nil. The path is polymorphic, meaning it will generate the method for the path from the two array values. If the first is nil, it will think it is just a package path.
form_for [@package.shop, @package]
will fix it. Or, in routes, you can expose a route at the top level to handle create.
resources :packages, :only => :create
I'd go with the first choice so the url looks about the same as 'new' if there's an error.