How to Incorporate Tabata Intervals

Options
What is the best way to incorporate the use of Tabata intervals? If I am at the gym for 40 minutes, should I be doing weights and finish off with 5 mins of Tabata cardio, or should I be doing some steady cardio and then do 5 mins of Tabata intervals, or should I be doing sets of Tabata intervals over the 40 minutes? And how often per week? Thanks in advance for any advice.