Hello there,
I am not sure what you hope to achieve by planting it in the garden?
It will never be hardy,and you will need (if you want it to survive) to dig it up before Winter and repot it.If you don't do this you will certainly lose it.It will never fruit in UK conditions,except in a tropically heated greenhouse.
I would keep it indoors in a warm sunny spot(or in a conservatory) and just repot it as it gets bigger.
I assume you mean the fruit Pineapple,and not the "Pineapple Bush" or Moroccan Broom?