How to use Time Machine backup when hard drive is broken? I have a MacBook Pro which I use Time Machine to back up usually weekly. Its hard drive broke recently.  I got an exactly same hard drive and installed it into the laptop.  How do I restore the computer into the most recent state using the Time Machine backup which was made when the old hard drive was installed?

Is there a better way to achieve the recovery than what I'm planning to do here?
The basic TimeMachine recovery procedure boils down to:

1) boot from Recovery/Installation media
2) make use of the Disk Utility (I recall under the tools menu option of the installation USB/DVDs) to format/partition the new disk
3) Then select/choose the Restore/transfer option where you can then select the TimeMachine (Or Migration Assistant) to restore from.

The problems I don't have an answer to as I've never done that in my setups:

a) recovery of the Recovery partition... I usually were doing "upgrades", thus I did fresh installs, and then I restored the TimeMachine specific files, or I used the "Migration Assistant" to restore the applications/users as need be

b) You didn't specify the version, which might mean different issues w.r.t. the medium, ie. USB/DVD/etc. Creating a USB boot image is outside the scope of this question and answer ;)