Before getting started, it should be noted that Ginsberg wrote "A Supermarket in California" as a prose poem without specific line breaks. The poem thus often appears in different layouts depending on font and page size, and so the reader should be aware that any reference to line numbers here is simply to aid with comprehension and understanding.
"A Supermarket in California" opens by immediately establishing the connection between the speaker—generally treated as Ginsberg himself—and the poem's addressee, Walt Whitman. Whitman was one of the most important American poets of the 19th century, a major innovator in both form and subject, and is considered by many to be the father of American poetry. Throughout the poem, the speaker will treat Whitman as a kind of guide, and addresses Whitman through apostrophe. Though the poem is set in a public space—a supermarket—this direct address creates a sense of intimacy between speaker and addressee. This makes the reader into a kind of voyeur of the speaker's innermost thoughts and searching questions.
It's also worth noting that this poet-as-guide figure is a common literary tradition. It's presented somewhat ironically by Ginsberg (in the sense that Whitman, a man who lived in the 1800s, would have no guidance to give the speaker in a 20th-century supermarket!). Still, the role of Whitman as the speaker's guide is similar to the way that Virgil, a poet from the days of ancient Rome, instructs Dante (the foremost Italian poet of the Middle Ages) in the Inferno. It's also worth noting that Whitman himself used long, flowing sentences without strict meter (known as free verse)—an approach mirrored by Ginsberg here.
The poem's first sentence places the reader directly in the speaker's mind with the mention of "thoughts," a "headache," and "self-conscious[ness]." The last of these is important, showing that the speaker is aware of his place—or lack of place—within American society. He can sense that he doesn't fit in, which is in part why he conjures up a more kindred spirit in the form of Walt Whitman.
The opening sentence also focuses on the act of walking, which is how the poem ends too. It's a lonely walk, with the "full moon" suggesting something supernatural or visionary in the atmosphere. In the second sentence, the speaker describes his state as one of "hungry fatigue." He goes to what seems like the right place to fix that: the supermarket. But, of course, this is not just a food-related hunger, but a metaphor for spiritual and intellectual longing as well.
The speaker goes "shopping for images," another metaphor. This suggests the way that society and media (things like television and magazine advertisements) have filled the speaker's mind with the longing for mere "images" rather than actual nourishment; for the appearance of fulfillment rather than actual fulfillment.
The image of "neon fruit" reflects the way that the produce seems too perfect, too shiny, even hyper-real. This represents the superficiality of the supermarket—and the type of so-called freedom that it represents—that is, the supposed freedom offered by consumer choice and spending power; people think they are exercising their freedom when they buy things, the poem implies, when really they are just buying into a system that makes them essentially slaves to money.
The speaker then dreams of Whitman's "enumerations"—his poetry. Whitman's work often cataloged the life he saw around him, especially in New York, in all its vibrancy and variation. There is an implied contrast, then, between the "enumeration"—the counting and cataloging—of the supermarket versus Whitman's poetry. Finally, it's worth noting that the exclamation mark—found throughout the poem—signals an ecstatic state, the speaker overcome by his vision of Whitman.