I don't think there is a faster way to do it. I agree with @Robin, maybe you can do this little improvement, but you can't improve a lot the performance.
I suggest, to improve the system, to insert, as I have done time ago on Rails 2, few lines of code to automatically detect the longitude and the latitude of a record, given the address and the city of the record, once you have to create a new record. In this way, you won't do a time-consuming loop like you wrote!
@shop = Shop.new(params[:shop])
@coordinates = []
seek_str = @shop.city + "," + @shop.address
@coordinates = Geocoding.get(seek_str)
@shop.lat = @coordinates[0][:latitude]
@shop.lng = @coordinates[0][:longitude]
Latitude and longitude are now geo-coded through city and address. City and address of the record are inserted with a form. Consider this is Rails 2, and maybe there are some edits you should do to get this working on Rails 3!