When doing acts of worship, they should be done sincerely and purely for the sake of Allaah alone, as Allaah says (interpretation of the meaning):
And they were commanded not, but that they should worship Allaah, and worship none but Him Alone (abstaining from ascribing partners to Him), and perform As‑Salaah (Iqaamat‑as‑Salaah) and give Zakaah, and that is the right religion
And who has (in mind) no favour from anyone to be paid back,
Except to seek the Countenance of his Lord, the Most High
And the Prophet (peace and blessings of Allaah be upon him) said: Allaah does not accept any deed except that which is done only for Him and to seek His Countenance.
Narrated by al-Nasaa'i, 3140; classed as saheeh by al-Albaani in al-Silsilah al-Saheehah, 52.
Think about what Allaah says (interpretation of the meaning):
Would that they were contented with what Allaah and His Messenger gave them and had said: Allaah is Sufficient for us. Allaah will give us of His Bounty, and so will His Messenger (from alms). We implore Allaah (to enrich us)
Note how this verse ascribes the giving to Allaah and His Messenger, and sufficiency to Allaah alone. The verse does not say Allaah and His Messenger are sufficient for us. And it describes the imploring as being to Allaah alone, as He said, We implore Allaah, and does not say we implore Allaah and His Messenger. This is like the verse in which Allaah says (interpretation of the meaning):
So when you have finished (your occupation), devote yourself for Allaah's worship.
And to your Lord (Alone) turn (all your) intentions and hopes
See Zaad al-Ma'aad, 1/36
So worship should be devoted to Allaah alone; it is not permissible to do any act of worship with the intention of drawing closer to any created being.
With regard to loving the Prophet (peace and blessings of Allaah be upon him), that means following him and venerating him, not by worshipping him.
Worship can only be acceptable to Allaah if it meets two conditions:
1 - It is done sincerely for Allaah alone
2 - It follows the Sunnah of Prophet (peace and blessings of Allaah be upon him) and is in accordance with his sharee'ah.
These two conditions are indicated by the verse in which Allaah says (interpretation of the meaning):
So whoever hopes for the Meeting with his Lord, let him work righteousness and associate none as a partner in the worship of his Lord
Ibn Katheer (may Allaah have mercy on him) said: Let him work righteousness' means, that which is in accordance with the laws of Allaah. And associate none as a partner in the worship of his Lord' means, worship in which he seeks the Countenance of Allaah alone, with no partner or associate.' These are the basis of acceptable deeds: it must be sincerely for the sake of Allaah alone, and correct according to the sharee'ah of the Messenger of Allaah (peace and blessings of Allaah be upon him).
So when you worship you must seek the Countenance of Allaah alone, and strive to follow the Sunnah of the Prophet (peace and blessings of Allaah be upon him). We ask Allaah to help us to do righteous deeds.
And Allaah knows best.
Reproduced from Islam QA