We are all familiar with C.S. Lewis's discussion on the "four loves" which is based on the different Greek uses of the term, along with his distinction between "giving love" and "needful love", etc. I'm not sure of the value of this distinction, but rather than critique it, I would like to look instead at the Biblical text and how it uses the word "love".
I would like to take as our starting point a basic puzzle: what exactly does it mean to love God? There seems to be a very fundamental and basic difference between loving God and loving men. Presumably God is already so infinitely blessed and perfect, it makes no sense to speak of "giving" or benefiting God anything, even less to "do charity" to God, given the beneficiary connotations of charity. There seems to be many ways to describe how we are to love men, do good to them, benefit them, help them, etc, etc. But many of these descriptions become puzzling when applied to God.
Let's take as our starting point the famous Deuteronomy 6:4-5 verse:
Hear, O Israel: The LORD our God is one LORD: And thou shalt love the LORD thy God with all thine heart, and with all thy soul, and with all thy might.
It is a matter of interest that the use of the word "love" here in Hebrew is the same word used in Leviticus 19:18 where we are to "love thy neighbour as thyself". So at the linguistic level there seems to be no distinction between the love whereby we are to love God and the love whereby we are to love men. In the Greek rendering of the "two greatest commandment", the same Greek word is also used to love God and to love man.
The "charity" reading of love, about doing good to others or benefiting them out of grace, has a different Hebrew word, frequently translated as "lovingkindness", and is almost always used of God to man in his particular acts of mercy, kindness, and grace. Again, presumably this would not apply to the command for us to love God, although it maybe that for us to love men will need us to show "lovingkindness", in which case charity or "lovingkindness" would be merely a subset of our duty to love men.
It is also to be noted that the idea of love as pure giving and with no needfulness, possession, or whatever, does not match with the way to word is used in the Bible. In Psalms 34:12 the same word is used to refer to he who "desireth life, loveth many days, that he may see good?", thus this clearly cannot mean the "giving" sense of love, but the possessive desiring sense of love. We can also note that even the Greek agape, which so much has been made of how it is all about unconditional love or whatever, is also used in the possessive sense in 1 Peter 3:10: "For he that will love life, and see good days, let him refrain his tongue from evil, and his lips that they speak no guile..." Thus, those who desire life and want to see "good days" should do blah blah blah.
It seems that, contra the theologians and philosophers who keep trying to purge Christian "love" of all its pleasurable or desire connotations, the Bible does use it in those sense. The question would turn naturally to, what then does it mean to "desire" God? To answer this I think it would be useful to look at the only instance of the Ten Commandments where the word love is used:
Thou shalt not make unto thee any graven image, or any likeness of any thing that is in heaven above, or that is in the earth beneath, or that is in the water under the earth: 5 Thou shalt not bow down thyself to them, nor serve them: for I the LORD thy God am a jealous God, visiting the iniquity of the fathers upon the children unto the third and fourth generation of them that hate me; 6 And shewing mercy unto thousands of them that love me, and keep my commandments
-Exodus 20:4-6
The love of the thousands who love God is contrasted against the idolaters who hate God. To love God and keep his commandments as such does mean to desire God to the exclusion of all other idols and false gods. As a tentative definition, I think there is something to be said for the idea that loving God is to desire what God desires, to ally, as it were, our wills with God. (I think Aquinas himself discusses this in the part of his Summa where he talks about how penal substitution can work because Christ is one in love with the Father via a union of wills, etc, etc.)
If we go with the definition of loving God as wanting what God wants, willing God's will as it were, then we can logically apply this to the second greatest commandment: wanting for our neighbours and fellow man what God wants for them, to return to God and to dwell with God and under God's will. To love our neighbour means to want for them what God wants for them, to bring salvation to them and to bring them to God.
Thus, the logical connection is clear, we want what God wants, and therefore want what God wants for our neighbours. This is how the Leviticus 19:17-18 verses makes sense, the contrast of hating your neighbour is not to coddle them, but to rebuke them and not to allow sin to rest upon them, it is to desire what God wants for them, not to leave them in their sin to their destruction, but to call them to repentance to bring them back to God.
Naturally in the prosecution of seeking God's desire for our neighbours we will do many "charity" and "lovingkindness" stuff, but I think we need to be clear that doing charity and lovingkindness stuff, while a very important, or even critical, aspect of our duty to love God and man, does not constitute its essence. Ultimately, love is about union of wills and desires, it is constituted by desire, and in the case of the two Greatest Commandments, Jesus teaches an express hierarchy of love: to love God first, to want what God wants, and then to love man as a consequence of that, to want for man what God wants for them. Lovingkindness and charity is the practical outworking of what such love would mean, but it is not the whole or even main thing.